Ejemplo n.º 1
0
 public void CheckDuplicateData(string astType, string astCode)
 {
     AstDefineInfo item = new AstDefineInfo { AstCode = astCode };
     IList<AstDefineInfo> astDefineInfoList = miscRep.GetData<Metas.AstDefine, AstDefineInfo>(item);
     if (astDefineInfoList.Count > 0)
     {
         throw new FisException("Duplicate AstCode!");
     }
 }
Ejemplo n.º 2
0
 public void UpdateAstDefineInfo(AstDefineInfo item, string astType, string astCode)
 {
     AstDefineInfo condition = new AstDefineInfo { AstType = astType, AstCode = astCode };
     if (item.AstCode != astCode)
     {
         CheckDuplicateData(item.AstType, item.AstCode);
     }
     miscRep.UpdateData<IMES.Infrastructure.Repository._Metas.AstDefine, AstDefineInfo>(condition,item);
 }
Ejemplo n.º 3
0
 private AstDefineInfo GetNewAstDefine(bool isAdd)
 {
     AstDefineInfo ast = new AstDefineInfo();
     ast.AstType = droAstType.SelectedValue;
     ast.AstCode = hidSelectedAstCode.Value; //droAstCode.SelectedValue;
     ast.AstLocation = droAstLocation.SelectedValue;
     ast.NeedAssignAstSN = droNeedAssignAstSN.SelectedValue;
     ast.AssignAstSNStation = hidAssignAstSNStation.Value.Trim(); //droAssignAstSNStation.SelectedValue;
     ast.CombineStation = droCombineStation.SelectedValue;
     ast.HasCDSIAst = droHasCDSIAst.SelectedValue;
     ast.NeedPrint = droNeedPrint.SelectedValue;
     ast.NeedScanSN = droNeedScanSN.SelectedValue;
     ast.CheckUnique = droCheckUnique.SelectedValue;
     ast.HasUPSAst = dropHasUPSAst.SelectedValue;
     ast.NeedBindUPSPO = dropNeedBindUPSPO.SelectedValue;
     ast.comment = txtComment.Text;
     ast.Udt = DateTime.Now;
     if (isAdd)
     {  
       ast.Cdt = DateTime.Now;
     }
     string user= Request["UserId"]??"";
     ast.Editor = user;
     return ast;
 }
Ejemplo n.º 4
0
 public void DelAstDefineInfo(string astType, string astCode)
 {
     AstDefineInfo item = new AstDefineInfo { AstType = astType, AstCode = astCode };
     miscRep.DeleteData<IMES.Infrastructure.Repository._Metas.AstDefine, AstDefineInfo>(item);
 }
Ejemplo n.º 5
0
 public void AddAstDefineInfo(AstDefineInfo item)
 {
     CheckDuplicateData(item.AstType, item.AstCode);
     miscRep.InsertData<IMES.Infrastructure.Repository._Metas.AstDefine, AstDefineInfo>(item);
 }