Esempio n. 1
0
 public void UpdateCheckItemTypeInfo(CheckItemTypeInfo item)
 {
     IList<CheckItemTypeInfo> ret = new List<CheckItemTypeInfo>();
     try
     {
         IPartRepository iPartRepository = RepositoryFactory.GetInstance().GetRepository<IPartRepository>();
         iPartRepository.UpdateCheckItemType(item);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 2
0
 public IList<CheckItemTypeInfo> GetCheckItemTypeByCondition(CheckItemTypeInfo condition)
 {
     IList<CheckItemTypeInfo> ret = new List<CheckItemTypeInfo>();
     try
     {
         IPartRepository iPartRepository = RepositoryFactory.GetInstance().GetRepository<IPartRepository>();
         ret = iPartRepository.GetCheckItemType(condition);
     }
     catch (Exception)
     {
         throw;
     }
     return ret;
 }
Esempio n. 3
0
 public IList<string> GetCheckType()
 {
     IList<string> checkType = new List<string>();
     try
     {
         CheckItemTypeInfo condition = new CheckItemTypeInfo();
         checkType = prtPcyRepository.GetNameFromCheckItemType(condition);
     }
     catch (Exception ee)
     {
         logger.Error(ee.Message);
         throw ee;
     }
     return checkType;
 }
Esempio n. 4
0
 private Boolean ShowListByType()
 {
     string type = this.cmbCheckItemType.SelectedValue;
     try
     {
         CheckItemTypeInfo condition = new CheckItemTypeInfo();
         if (type != "ALL")
         {
             condition.name = type;
         }
         IList<CheckItemTypeInfo> dataList = iCheckItemType.GetCheckItemTypeByCondition(condition);
         if (dataList == null || dataList.Count == 0)
         {
             bindTable(null, DEFAULT_ROWS);
         }
         else
         {
             bindTable(dataList, DEFAULT_ROWS);
         }
     }
     catch (FisException ex)
     {
         bindTable(null, DEFAULT_ROWS);
         showErrorMessage(ex.mErrmsg);
         return false;
     }
     catch (Exception ex)
     {
         //show error
         bindTable(null, DEFAULT_ROWS);
         showErrorMessage(ex.Message);
         return false;
     }
     return true;
 }
Esempio n. 5
0
 protected void btnSave_ServerClick(Object sender, EventArgs e)
 {
     CheckItemTypeInfo addEditInfo = new CheckItemTypeInfo();
     string hidChcekItemType = this.hidChcekItemType.Value.Trim();
     string chcekItemType = this.txtCheckItemType.Text.Trim();
     string displayName = this.txtDisPlayName.Text.Trim();
     string filterModule = this.txtFilterModule.Text.Trim();
     string matchModule= this.txtMatchModule.Text.Trim();
     string checkModule = this.txtCheckModule.Text.Trim();
     string saveModule = this.txtSaveModule.Text.Trim();
     bool needUniqueCheck = this.cmbNeedUniqueCheck.SelectedValue == "True" ? true : false;
     bool needCommonSave = this.cmbNeedCommonSave.SelectedValue == "True" ? true : false;
     bool needPartForbidCheck = this.cmbNeedPartForbidCheck.SelectedValue == "True" ? true : false;
     try
     {
         CheckItemTypeInfo condition = new CheckItemTypeInfo();
         if (hidChcekItemType == "")
         {
             condition.name = chcekItemType;
         }
         else
         {
             condition.name = hidChcekItemType;
         }
         IList<CheckItemTypeInfo> checkItemTypeList = iCheckItemType.GetCheckItemTypeByCondition(condition);
         
         addEditInfo.name = chcekItemType;
         addEditInfo.displayName = displayName;
         addEditInfo.filterModule = filterModule;
         addEditInfo.matchModule = matchModule;
         addEditInfo.checkModule = checkModule;
         addEditInfo.saveModule = saveModule;
         addEditInfo.needUniqueCheck = needUniqueCheck;
         addEditInfo.needCommonSave = needCommonSave;
         addEditInfo.needPartForbidCheck = needPartForbidCheck;
         addEditInfo.editor = this.HiddenUserName.Value;
         if (checkItemTypeList.Count == 0)
         {
             addEditInfo.cdt = DateTime.Now;
             addEditInfo.udt = DateTime.Now;
             iCheckItemType.AddCheckItemTypeInfo(addEditInfo);
         }
         else
         {
             iCheckItemType.UpdateCheckItemTypeInfo(addEditInfo);
         }
     }
     catch (FisException ex)
     {
         showErrorMessage(ex.mErrmsg);
         return;
     }
     catch (Exception ex)
     {
         showErrorMessage(ex.Message);
         return;
     }
     initcmbCheckItemTypeList();
     this.updatePanel2.Update();
     this.cmbCheckItemType.SelectedValue = addEditInfo.name;
     ShowListByType();
     ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "saveUpdate", "DealHideWait();", true);
 }
Esempio n. 6
0
 private void initcmbCheckItemTypeList()
 {
     this.cmbCheckItemType.Items.Clear();
     //this.cmbCheckItemType.Items.Add(string.Empty);
     this.cmbCheckItemType.Items.Add("ALL");
     CheckItemTypeInfo condition = new CheckItemTypeInfo();
     IList<CheckItemTypeInfo> chcekItemTypeInfoList = iCheckItemType.GetCheckItemTypeByCondition(condition);
     IList<ListItem> inneritem = new List<ListItem>();
     foreach (CheckItemTypeInfo info in chcekItemTypeInfoList)
     {
         ListItem item = new ListItem();
         item.Text = info.name;
         item.Value = info.name;
         inneritem.Add(item);
         this.cmbCheckItemType.Items.Add(item);
     }
     this.cmbCheckItemType.SelectedIndex = 0;
     ShowListByType();
 }