コード例 #1
0
 public FailSystemMngFrm(MainForm main)
 {
     InitializeComponent();
     this.MdiParent   = main;
     this.WindowState = FormWindowState.Maximized;
     this.WindowState = FormWindowState.Maximized;
     Bll = new BLL.fail_system();
     getAllList();
 }
コード例 #2
0
ファイル: FailureTreeFrm.cs プロジェクト: aaron1430/FDS
        private void initCmbFailSystem()
        {
            flSysIdLst = new List <int>();
            BLL.fail_system          flSysBll  = new BLL.fail_system();
            List <Model.fail_system> flSysList = new List <Model.fail_system>();

            flSysList = flSysBll.GetModelList("");
            for (int i = 0; i < flSysList.Count; i++)
            {
                cmbFailSystem.Items.Add(flSysList[i].system_name);
                flSysIdLst.Add(flSysList[i].system_id);
            }
        }
コード例 #3
0
        private void initFailSystem()
        {
            progressBar1.Value = 50;
            DataSet ds = LoadDataFromExcel(fileName, "涉及的系统");

            BLL.fail_system   bll   = new BLL.fail_system();
            Model.fail_system model = new Model.fail_system();
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                if (dr["涉及的系统"].ToString() == "")
                {
                    return;
                }
                model.system_name = dr["涉及的系统"].ToString();
                bll.Add(model);
            }
        }
コード例 #4
0
ファイル: FailSystemAddFrm.cs プロジェクト: aaron1430/FDS
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     if (txtName.Text.Trim() == "")
     {
         MessageBox.Show("故障系统不能为空!");
         return;
     }
     BLL.fail_system Bll = new BLL.fail_system();
     if (Bll.GetModel(txtName.Text.Trim()) != null)
     {
         MessageBox.Show("故障系统已存在!");
         return;
     }
     Model.fail_system addModel = new Model.fail_system();
     addModel.system_name   = txtName.Text.Trim();
     addModel.system_remark = rchTxtRemark.Text;
     Bll.Add(addModel);
     this.Close();
 }
コード例 #5
0
ファイル: FailSystemEditFrm.cs プロジェクト: aaron1430/FDS
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     if (txtName.Text.Trim() == "")
     {
         MessageBox.Show("故障系统不能为空!");
         return;
     }
     BLL.fail_system   Bll   = new BLL.fail_system();
     Model.fail_system Model = Bll.GetModel(txtName.Text.Trim());
     if (Model != null && Model.system_id != this.EditModel.system_id)
     {
         MessageBox.Show("故障系统已存在!");
         return;
     }
     EditModel.system_name   = txtName.Text.Trim();
     EditModel.system_remark = rchTxtRemark.Text;
     Bll.Update(EditModel);
     MessageBox.Show("修改成功!");
     this.Close();
 }
コード例 #6
0
        private void initFaultHistory()
        {
            progressBar1.Value = 90;
            DataSet ds = LoadDataFromExcel(fileName, "故障案例库信息");

            BLL.fault_history   bll   = new BLL.fault_history();
            Model.fault_history model = new Model.fault_history();

            BLL.time_point  tpBll = new BLL.time_point();
            BLL.fail_system fsBll = new BLL.fail_system();
            BLL.plane_type  ptBll = new BLL.plane_type();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                if (dr["案例编号"].ToString() == "")
                {
                    return;
                }
                model.fh_addtime     = DateTime.Now;
                model.fh_adduser     = constants.currentUser.user_id;
                model.fh_caseid      = dr["案例编号"].ToString();
                model.fh_cause       = dr["故障原因"].ToString();
                model.fh_description = dr["相关描述"].ToString();
                model.fh_experience  = dr["经验教训"].ToString();
                model.fh_explain     = dr["解释"].ToString();
                model.fh_keywd       = dr["关键词"].ToString();
                model.fh_phenomenon  = dr["故障现象"].ToString();
                model.fh_reference   = dr["参考资料"].ToString();
                model.fh_suggest     = dr["维修建议"].ToString();
                model.fh_title       = dr["案例标题"].ToString();
                model.ptype_id       = ptBll.GetModel(dr["飞机型号"].ToString()).ptype_id;
                model.system_id      = fsBll.GetModel(dr["故障系统"].ToString()).system_id;
                model.tpoint_id      = tpBll.GetModel(dr["发生时机"].ToString()).tpoint_id;
                bll.Add(model);
            }
        }