예제 #1
0
        private void RefEquipmentClass(object seder, EventArgs e)
        {
            ITreeClassDAL dal = new EquipmentClassDAL();
            FmRClassInfo  frm = new FmRClassInfo(dal, "设备分类");

            if (frm.ShowDialog() == DialogResult.OK)
            {
                var result = frm.Result as EquipmentClass;
                foreach (DataRow r in model.dtEquipment.Rows)
                {
                    if ((bool)r["bClass"] && Convert.ToInt32(r["EQId"]) == result.EQCId)
                    {
                        throw new Exception("设备分类: " + result.Code + " 已存在!");
                    }
                }

                var row = model.dtEquipment.NewRow();
                row["MID"]        = this.MId;
                row["bClass"]     = true;
                row["bClassDesc"] = "设备分类";
                row["EQId"]       = result.EQCId;
                row["cEQCode"]    = result.Code;
                row["cEQName"]    = result.Name;
                row["iOrder"]     = 5;
                model.dtEquipment.Rows.Add(row);
            }
        }
예제 #2
0
 private void RefEquipmentCls(object sender, EventArgs e)
 {
     #region 参照--设备分类
     var          dal = new EquipmentClassDAL();
     FmRClassInfo frm = new FmRClassInfo(dal, "设备分类");
     if (frm.ShowDialog() == DialogResult.OK)
     {
         var result = frm.Result as EquipmentClass;
         (sender as TextBox).Text = result.Name;
         model.EQCId    = result.EQCId;
         model.cEQCCode = result.Code;
     }
     #endregion
 }
예제 #3
0
        private void RefEquipmentClass()
        {
            ITreeClassDAL dal = new EquipmentClassDAL();
            FmRClassInfo  frm = new FmRClassInfo(dal, "设备分类");

            if (frm.ShowDialog() == DialogResult.OK)
            {
                var result = frm.Result as EquipmentClass;
                model.EQId        = result.EQCId;
                txtr_cEQCode.Text = result.Code;
                txtr_cEQName.Text = result.Name;
                model.bClass      = true;
            }
        }
예제 #4
0
파일: FmMould.cs 프로젝트: hanxiaomeme/CERP
 private void RefMouldClass(object sender, EventArgs e)
 {
     #region 参照--模具分类
     ITreeClassDAL dal = new MouldClassDAL();
     FmRClassInfo  frm = new FmRClassInfo(dal, "模具分类");
     if (frm.ShowDialog() == DialogResult.OK)
     {
         var result = frm.Result as MouldClass;
         (sender as TextBox).Text = result.Name;
         model.MCId    = result.MCId;
         model.cMCCode = result.Code;
     }
     #endregion
 }