Esempio n. 1
0
 public TimePointMngFrm(MainForm main)
 {
     InitializeComponent();
     this.MdiParent   = main;
     this.WindowState = FormWindowState.Maximized;
     this.WindowState = FormWindowState.Maximized;
     Bll = new BLL.time_point();
     getAllList();
 }
Esempio n. 2
0
        private void initCmbTimePoint()
        {
            tmPntIdLst = new List <int>();
            BLL.time_point          tmPntBll  = new BLL.time_point();
            List <Model.time_point> tmPntList = new List <Model.time_point>();

            tmPntList = tmPntBll.GetModelList("");
            for (int i = 0; i < tmPntList.Count; i++)
            {
                cmbTimePoint.Items.Add(tmPntList[i].tpoint_value);
                tmPntIdLst.Add(tmPntList[i].tpoint_id);
            }
        }
Esempio n. 3
0
        private void initTimePoint()
        {
            progressBar1.Value = 60;
            DataSet ds = LoadDataFromExcel(fileName, "发生时机");

            BLL.time_point   bll   = new BLL.time_point();
            Model.time_point model = new Model.time_point();
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                if (dr["发生时机"].ToString() == "")
                {
                    return;
                }
                model.tpoint_value = dr["发生时机"].ToString();
                bll.Add(model);
            }
        }
Esempio n. 4
0
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     if (txtName.Text.Trim() == "")
     {
         MessageBox.Show("故障时机不能为空!");
         return;
     }
     BLL.time_point Bll = new BLL.time_point();
     if (Bll.GetModel(txtName.Text.Trim()) != null)
     {
         MessageBox.Show("故障时机已存在!");
         return;
     }
     Model.time_point addModel = new Model.time_point();
     addModel.tpoint_value  = txtName.Text.Trim();
     addModel.tpoint_remark = rchTxtRemark.Text;
     Bll.Add(addModel);
     this.Close();
 }
Esempio n. 5
0
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     if (txtName.Text.Trim() == "")
     {
         MessageBox.Show("故障时机不能为空!");
         return;
     }
     BLL.time_point   Bll   = new BLL.time_point();
     Model.time_point Model = Bll.GetModel(txtName.Text.Trim());
     if (Model != null && Model.tpoint_id != this.EditModel.tpoint_id)
     {
         MessageBox.Show("型号已存在!");
         return;
     }
     EditModel.tpoint_value  = txtName.Text.Trim();
     EditModel.tpoint_remark = rchTxtRemark.Text;
     Bll.Update(EditModel);
     MessageBox.Show("修改成功!");
     this.Close();
 }
Esempio n. 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);
            }
        }