コード例 #1
0
 private static void VO2PO(IList<SATestCheckRuleDef> dataLst, IList<PcaTestCheckInfo> infLst)
 {
     foreach (PcaTestCheckInfo tmp in infLst)
     {
         SATestCheckRuleDef def = new SATestCheckRuleDef();
         def.id = tmp.id;
         def.code = tmp.code;
         def.mac = (tmp.mac.ToUpper() == "Y" ? "Y" : "N");
         def.mbct = (tmp.mbct.ToUpper() == "Y" ? "Y" : "N");
         def.hddv = tmp.hddv;
         def.bios = tmp.bios;
         def.editor = tmp.editor;
         def.cdt = tmp.cdt.ToString("yyyy-MM-dd hh:mm:ss");
         def.udt = tmp.udt.ToString("yyyy-MM-dd hh:mm:ss");
         dataLst.Add(def);
     }
 }
コード例 #2
0
    protected void btnSave_ServerClick(object sender, EventArgs e)
    {
        SATestCheckRuleDef def = new SATestCheckRuleDef();
        def.code = this.ttCode.Text.Trim().ToUpper();
        def.mac = (this.MacCheck.Checked == true ? "Y" : "N");
        def.mbct = (this.MBCTCheck.Checked == true ? "Y" : "N");
        def.hddv = this.ttHDDV.Text.Trim().ToUpper();
        def.bios = this.ttBIOS.Text.Trim().ToUpper();
        def.editor = this.HiddenUserName.Value.Trim();

        def.id = Convert.ToInt32(this.dOldId.Value.Trim());
        string id = this.dOldId.Value.Trim();
        try
        {
            //调用更新方法1... 相同key时需要抛出异常...
            isa.UpdateSATestCheckRuleItem(def);

        }
        catch (FisException fex)
        {
            showErrorMessage(fex.mErrmsg);
            return;
        }
        catch (System.Exception ex)
        {
            //IList<IMES.DataModel.ACAdaptor> datalst = iACAdaptor.GetAllAdaptorInfo();
            //bindTable(datalst, DEFAULT_ROWS);
            showErrorMessage(ex.Message);
            return;
        }
        //根据ac acdaptor list的数据加载表格中的数据
        //...
        showListByACAdaptorList();
        this.updatePanel2.Update();
        //     string currentAssmebly = replaceSpecialChart(assembly);
        ScriptManager.RegisterStartupScript(this.updatePanel, typeof(System.Object), "saveUpdate", "resetTableHeight();AddUpdateComplete('" + id + "');HideWait();", true);
    }
コード例 #3
0
    protected void btnAdd_ServerClick(object sender, EventArgs e)
    {
        SATestCheckRuleDef def = new SATestCheckRuleDef();

        def.code = this.ttCode.Text.Trim().ToUpper();
        def.mac = (this.MacCheck.Checked == true ? "Y" : "N");
        def.mbct = (this.MBCTCheck.Checked == true ? "Y" : "N");
        def.hddv = this.ttHDDV.Text.Trim().ToUpper();
        def.bios = this.ttBIOS.Text.Trim().ToUpper();

        def.editor = this.HiddenUserName.Value;

        System.DateTime cdt = DateTime.Now; ;
        string timeStr = cdt.ToString();
        def.cdt = timeStr;
        def.udt = DateTime.Now.ToString();
        string id = "";
        try
        {

            //调用添加的方法 相同的key时需要抛出异常...
            id = isa.AddSATestCheckRuleItem(def).ToString();
        }
        catch (FisException fex)
        {

            showErrorMessage(fex.mErrmsg);
            return;
        }
        catch (System.Exception ex)
        {

            showErrorMessage(ex.Message);
            return;
        }
        //按照ac adaptor list加载表格中的数据
        //...
        showListByACAdaptorList();
        this.updatePanel2.Update();
        //    string assemblyId = replaceSpecialChart(adaptor.assemb);
        ScriptManager.RegisterStartupScript(this.updatePanel, typeof(System.Object), "saveUpdate", "resetTableHeight();AddUpdateComplete('" + id + "');HideWait();", true);
    }