Ejemplo n.º 1
0
 public PlaneTypeMngFrm(MainForm main)
 {
     InitializeComponent();
     this.MdiParent   = main;
     this.WindowState = FormWindowState.Maximized;
     this.WindowState = FormWindowState.Maximized;
     Bll = new BLL.plane_type();
     getAllList();
 }
Ejemplo n.º 2
0
        private void initCmbPlaneType()
        {
            plnTypIdLst = new List <int>();
            BLL.plane_type          plnTypBll  = new BLL.plane_type();
            List <Model.plane_type> plnTypList = new List <Model.plane_type>();

            plnTypList = plnTypBll.GetModelList("");

            for (int i = 0; i < plnTypList.Count; i++)
            {
                cmbPlaneType.Items.Add(plnTypList[i].ptype_name);
                plnTypIdLst.Add(plnTypList[i].ptype_id);
            }
        }
Ejemplo n.º 3
0
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     if (txtName.Text.Trim() == "")
     {
         MessageBox.Show("飞机型号不能为空!");
         return;
     }
     BLL.plane_type Bll = new BLL.plane_type();
     if (Bll.GetModel(txtName.Text.Trim()) != null)
     {
         MessageBox.Show("飞机型号已存在!");
         return;
     }
     Model.plane_type addModel = new Model.plane_type();
     addModel.ptype_name   = txtName.Text.Trim();
     addModel.plane_remark = rchTxtRemark.Text;
     Bll.Add(addModel);
     this.Close();
 }
Ejemplo n.º 4
0
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     if (txtName.Text.Trim() == "")
     {
         MessageBox.Show("型号名称不能为空!");
         return;
     }
     BLL.plane_type   Bll   = new BLL.plane_type();
     Model.plane_type Model = Bll.GetModel(txtName.Text.Trim());
     if (Model != null && Model.ptype_id != this.EditModel.ptype_id)
     {
         MessageBox.Show("型号已存在!");
         return;
     }
     EditModel.ptype_name   = txtName.Text.Trim();
     EditModel.plane_remark = rchTxtRemark.Text;
     Bll.Update(EditModel);
     MessageBox.Show("修改成功!");
     this.Close();
 }
Ejemplo n.º 5
0
        private void initPlaneType()
        {
            progressBar1.Value = 40;
            try
            {
                DataSet          ds    = LoadDataFromExcel(fileName, "飞机型号");
                BLL.plane_type   bll   = new BLL.plane_type();
                Model.plane_type model = new Model.plane_type();
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    if (dr["型号"].ToString() == "")
                    {
                        return;
                    }
                    model.ptype_name = dr["型号"].ToString();;
                    bll.Add(model);
                }
            }

            catch
            {
            }
        }
Ejemplo 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);
            }
        }