126 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			126 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			C#
		
	
	
	
| 
 | |
| /// <summary>
 | |
| ///INTERFACE CLASS FOR TABLE t_wmslocation
 | |
| ///By wm with codesmith. 
 | |
| ///on 05/02/2017
 | |
| /// </summary>
 | |
| 
 | |
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.Linq;
 | |
| using System.Text;
 | |
| using System.Data;
 | |
| using System.Data.SqlClient;
 | |
| using DeiNiu.Utils;
 | |
| 
 | |
| namespace DeiNiu.wms.Data.Model
 | |
| {
 | |
|     [Serializable]
 | |
|     public class Wmslocation : WmsLocation_base
 | |
|     {
 | |
|         public Wmslocation()
 | |
|         {
 | |
| 
 | |
|         }
 | |
|         public Wmslocation(SqlConnection _Conn):base(_Conn) 
 | |
|         {
 | |
| 
 | |
|         }
 | |
| 
 | |
|         public Wmslocation(int id): base(id)
 | |
|         {
 | |
| 
 | |
|         }
 | |
|          public Wmslocation(DataRow dr): base(dr)
 | |
|         {
 | |
| 
 | |
|         }
 | |
|          public Wmslocation(String locationId) 
 | |
|          {
 | |
|              cmdParameters[0] = locationId;
 | |
|              getModel(10);
 | |
| 
 | |
|          }
 | |
| 
 | |
|          public new int Add()
 | |
|          {
 | |
|              base.Add();
 | |
|              this.locationId128 = Util.getCode128(locationId + "");
 | |
|              Update();
 | |
|              return ID;
 | |
|          }
 | |
|          protected override void getImp()
 | |
|          {
 | |
|              model_imp = new Wmslocation_Imp();
 | |
| 
 | |
|          }
 | |
|        
 | |
|         //begin cust db operation, query, excute sql etc.
 | |
| 
 | |
|         //public override DataSet Query()  
 | |
|         //{ 
 | |
|         //    return  CustQuery(100);
 | |
|         //}
 | |
| 
 | |
|        
 | |
|          
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 清除空货位
 | |
|         /// </summary>
 | |
|         /// <returns></returns>
 | |
|         public int freeLocations()
 | |
|         {
 | |
|             return CustOper(400);
 | |
|         }
 | |
| 
 | |
| 
 | |
| 
 | |
|         /// <summary>
 | |
|         /// get location info by locId
 | |
|         /// </summary>
 | |
|         /// <returns></returns>
 | |
|         public DataTable getLocations(string locId)
 | |
|         {
 | |
|             cmdParameters[0] = locId;
 | |
|             return CustQuery(500).Tables[0];
 | |
|         }
 | |
| 
 | |
|         
 | |
| 
 | |
|         public bool updateLocationStatus(string IDS, int status, int operId)
 | |
|         {
 | |
|             cmdParameters[0] = IDS;
 | |
|             cmdParameters[1] = status;
 | |
|             cmdParameters[2] = operId;
 | |
|             return CustOper(620) > 0;
 | |
|         }
 | |
| 
 | |
|       
 | |
|         public bool updateLocationLabelId(string IDs, Structs locs, int operId)
 | |
|         {
 | |
|             cmdParameters[0] = IDs;
 | |
|             cmdParameters[1] = locs.elabId;
 | |
|             cmdParameters[2] = locs.elabAddress;
 | |
|             cmdParameters[3] = operId;
 | |
|             return CustOper(640) > 0; 
 | |
|         }
 | |
| 
 | |
|         public int deleteLocations(string IDs)
 | |
|         {
 | |
|             cmdParameters[0] = IDs;
 | |
|             
 | |
|             return CustOper(650) ; 
 | |
| 
 | |
|         }
 | |
|         /// <summary>
 | |
|         /// query location percent data
 | |
|         /// </summary>
 | |
|         /// <returns></returns>
 | |
|         public DataTable getLocationsUsedPercent()
 | |
|         { 
 | |
|             return CustQuery(670).Tables[0];
 | |
|         }
 | |
|     }
 | |
| }
 | |
|   |