Example #1
0
 public void CheckDuplicateData(string model, string assemblycode)
 {
     ModelAssemblyCodeInfo item = new ModelAssemblyCodeInfo { Model = model };
     IList<ModelAssemblyCodeInfo> astDefineInfoList = miscRep.GetData<Metas.ModelAssemblyCode, ModelAssemblyCodeInfo>(item);
     if (astDefineInfoList.Count > 0)
     {
         throw new FisException("Duplicate Model!");
     }
 }
Example #2
0
 public void UpdateModelAssemblyCodeInfo(ModelAssemblyCodeInfo item, string model, string assemblycode)
 {
      ModelAssemblyCodeInfo condition = new ModelAssemblyCodeInfo { Model = model, AssemblyCode = assemblycode };
      if (item.Model != model)
      {
          CheckDuplicateData(item.Model, item.AssemblyCode);
      }
      miscRep.UpdateData<IMES.Infrastructure.Repository._Metas.ModelAssemblyCode, ModelAssemblyCodeInfo>(condition, item);
 }
Example #3
0
 public void AddModelAssemblyCodeInfo(ModelAssemblyCodeInfo item)
 {
     CheckDuplicateData(item.Model, item.AssemblyCode);
     miscRep.InsertData<IMES.Infrastructure.Repository._Metas.ModelAssemblyCode, ModelAssemblyCodeInfo>(item);
 }
Example #4
0
 public void DelModelAssemblyCodeInfo(string model, string assemblycode)
 {
     ModelAssemblyCodeInfo item = new ModelAssemblyCodeInfo { Model = model, AssemblyCode = assemblycode };
     miscRep.DeleteData<IMES.Infrastructure.Repository._Metas.ModelAssemblyCode, ModelAssemblyCodeInfo>(item);
 }
Example #5
0
 private ModelAssemblyCodeInfo GetNewAstDefine(bool isAdd)
 {
      string user= Request["UserId"]??"";
    
     ModelAssemblyCodeInfo ast = new ModelAssemblyCodeInfo();
     ast.Model = TXTModel.Text.ToUpper().Trim();
     ast.AssemblyCode = TXTAssemblycode.Text.ToUpper().Trim();
     ast.Revision = TXTRev.Text.ToUpper().Trim();
     ast.SupplierCode = TXTSuppliercode.Text.ToUpper().Trim();
     ast.Remark = TXTRemark.Text.Trim();
     ast.Editor = user;
     ast.Udt = DateTime.Now;
     if (isAdd)
     {
         ast.Cdt = DateTime.Now;
     }
     return ast;
 }