예제 #1
0
 //取得ModelWeightTolerance列表,family为空时取得Model==customer的纪录
 public IList<ModelWeightTolerance> GetModelWeightToleranceList(string customer, string family)
 {
     IList<ModelWeightTolerance> modelWeightToleranceList = new List<ModelWeightTolerance>();
     if(family == null || family == "")
     {
         ModelTolerance modelTolerance = modelToleranceRepository.FindModelWeightToleranceByCustomer(customer);
         if (modelTolerance != null)
         {
             ModelWeightTolerance modelWeightTolerance = new ModelWeightTolerance();
             modelWeightTolerance.Model = modelTolerance.Model;
             modelWeightTolerance.Udt = modelTolerance.Udt;
             modelWeightTolerance.UnitTolerance = modelTolerance.UnitTolerance;
             modelWeightTolerance.CartonTolerance = modelTolerance.CartonTolerance;
             modelWeightTolerance.Cdt = modelTolerance.Cdt;
             modelWeightTolerance.Editor = modelTolerance.Editor;
             modelWeightToleranceList.Add(modelWeightTolerance);
         }
     }
     else
     {
         IList<ModelTolerance> modelToleraceList = modelToleranceRepository.FindModelWeightToleranceListByFamily(family);
         foreach (ModelTolerance modelTolerance in modelToleraceList)
         {
             ModelWeightTolerance modelWeightTolerance = new ModelWeightTolerance();
             modelWeightTolerance.Model = modelTolerance.Model;
             modelWeightTolerance.Udt = modelTolerance.Udt;
             modelWeightTolerance.UnitTolerance = modelTolerance.UnitTolerance;
             modelWeightTolerance.CartonTolerance = modelTolerance.CartonTolerance;
             modelWeightTolerance.Cdt = modelTolerance.Cdt;
             modelWeightTolerance.Editor = modelTolerance.Editor;
             modelWeightToleranceList.Add(modelWeightTolerance);
         }
     }
     return modelWeightToleranceList;
 }
예제 #2
0
 /// 更新纪录
 public void UpdateModelWeightTolerance(ModelWeightTolerance modelWeightTolerance,string model)
 {
     ModelTolerance modelTolerance = new ModelTolerance();
     modelTolerance.Model = modelWeightTolerance.Model;
     modelTolerance.Udt = new DateTime();
     modelTolerance.UnitTolerance = modelWeightTolerance.UnitTolerance;
     modelTolerance.CartonTolerance = modelWeightTolerance.CartonTolerance;
     modelTolerance.Cdt = modelWeightTolerance.Cdt;
     modelTolerance.Editor = modelWeightTolerance.Editor;
     modelToleranceRepository.UpdateModelWeightTolerance(modelTolerance,model);
 }
예제 #3
0
 /// 添加新纪录
 public void AddModelWeightTolerance(ModelWeightTolerance modelWeightTolerance)
 {
     ModelTolerance modelTolerance = new ModelTolerance();
     modelTolerance.Model = modelWeightTolerance.Model;
     modelTolerance.Udt = modelWeightTolerance.Udt;
     modelTolerance.UnitTolerance = modelWeightTolerance.UnitTolerance;
     modelTolerance.CartonTolerance = modelWeightTolerance.CartonTolerance;
     modelTolerance.Cdt = modelWeightTolerance.Cdt;
     modelTolerance.Editor = modelWeightTolerance.Editor;
     modelToleranceRepository.AddModelWeightTolerance(modelTolerance);
 }