Beispiel #1
0
 private static MasterLabelInfo PO2VO(MasterLabelDef def)
 {
     MasterLabelInfo inf = new MasterLabelInfo();
     inf.id = def.id;
     inf.vc = def.vc;
     inf.family = def.family;
     inf.editor = def.editor;
     inf.code = def.code;
     inf.cdt = Convert.ToDateTime(def.cdt);
     inf.udt = Convert.ToDateTime(def.udt);
     return inf;
 }
Beispiel #2
0
 private static MasterLabelDef VO2PO(MasterLabelInfo info)
 {
     MasterLabelDef def = new MasterLabelDef();
     def.id = info.id;
     def.vc = info.vc.ToUpper();
     def.family = info.family;
     def.code = info.code.ToUpper();
     def.editor = info.editor;
     def.udt = info.udt.ToString("yyyy-MM-dd HH:mm:ss");
     def.cdt = info.cdt.ToString("yyyy-MM-dd HH:mm:ss");
     return def;
 }
Beispiel #3
0
 protected void Delete_ServerClick(Object sender, EventArgs e)
 {
     try
     {
         string family = this.cmbFamily1.InnerDropDownList.SelectedValue.Trim();
         string vc = this.ttVc.Value.Trim();
         IList<MasterLabelDef> lstMasterLabel = null;
         MasterLabelDef deleteItem = new MasterLabelDef();
         
         deleteItem.id = int.Parse(this.hidDeleteID.Value);
         imasterLabel.RemoveMasterLabelItem(deleteItem.id);
         this.cmbFamily1.refresh();
         this.cmbFamily1.InnerDropDownList.SelectedValue = family;
         
         lstMasterLabel = imasterLabel.GetMasterLabelByVCAndCode(vc, family);
         bindTable(lstMasterLabel, DEFAULT_ROWS);
     }
     catch (FisException ex)
     {
         showErrorMessage(ex.mErrmsg);
         bindTable(null, DEFAULT_ROWS);
         //this.hidRecordCount.Value = "0";
     }
     catch (Exception ex)
     {
         showErrorMessage(ex.Message);
         bindTable(null, DEFAULT_ROWS);
         //this.hidRecordCount.Value = "0";
     }
     finally
     {
         hideWait();
     }
 }
Beispiel #4
0
    protected void Save_ServerClick(Object sender, EventArgs e)
    {
    //    string msgHasExistRecord = GetLocalResourceObject(Pre + "_msgHasExistRecord").ToString();

        try
        {
            IList<MasterLabelDef> lstMasterLabel = null;
            string family = this.cmbFamily2.InnerDropDownList.SelectedValue.Trim();
            //itc-1361-0087 itc210012
            string vc = this.ttVcBottom.Value.Trim().ToUpper();
            string code = this.ttCode.Value.Trim().ToUpper();
           
            string id = this.hidDeleteID.Value;
            MasterLabelDef ml = new MasterLabelDef();
            ml.vc = vc;
            ml.code = code;
            ml.family = family;
            ml.editor = this.HiddenUserName.Value;
            gFamily = family;
            gVc = vc;
  
            if (!string.IsNullOrEmpty(id))
            {
                ml.id = int.Parse(id);
            }
            imasterLabel.SaveMasterLabelItem(ml);

            //this.cmbFamily1.refresh();
            //this.cmbFamily1.InnerDropDownList.SelectedValue = family;

            lstMasterLabel = imasterLabel.GetMasterLabelByVCAndCode(this.ttVc.Value.Trim(), this.cmbFamily1.InnerDropDownList.SelectedValue.Trim());

            bindTable(lstMasterLabel, DEFAULT_ROWS);
            //this.ttVc.Value = vc;
            //this.updatePanel6.Update();
            ScriptManager.RegisterStartupScript(this.updatePanel, typeof(System.Object), "saveUpdate", "resetTableHeight();AddUpdateComplete('" + vc + "','" + family + "');", true);
        }
        catch (FisException ex)
        {
            showErrorMessage(ex.mErrmsg);
  //          showAlertErrorMessage(msgHasExistRecord);
        }
        catch (Exception ex)
        {
            showErrorMessage(ex.Message);
            bindTable(null, DEFAULT_ROWS);
            //this.hidRecordCount.Value = "0";
        }
        finally
        {
           
            hideWait();
        }

    }