Пример #1
0
 public WndEdit(string jclsh)
 {
     InitializeComponent();
     m_db   = new MSSqlAccess(dbConfig.g_strConnectionStringSqlClient1);
     m_info = m_db.Find <RESULT_VEHICLE_INFO>("JCLSH", jclsh);
 }
Пример #2
0
 private void m_VehModel_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (m_VehModel.SelectedItems.Count == 0)
     {
         return;
     }
     else
     {
         ResetTextBox();
         string model = m_VehModel.SelectedItem.ToString();
         for (int i = 0; i < m_relations.Count; i++)
         {
             if (m_relations[i].MODEL_NAME == model)
             {
                 string key = "SEARCH_CONDITION";
                 if (m_relations[i].METHOD_NAME.Contains("ASM"))
                 {
                     var m_asm = m_db.Find <DEV_STANDARD_ASM>(key, model);
                     if (m_asm.ID > 0)
                     {
                         m_Edit25HC.Text = m_asm.HC5025XZ;
                         m_Edit25CO.Text = m_asm.CO5025XZ;
                         m_Edit25NO.Text = m_asm.NO5025XZ;
                         m_Edit40HC.Text = m_asm.HC2540XZ;
                         m_Edit40CO.Text = m_asm.CO2540XZ;
                         m_Edit40NO.Text = m_asm.NO2540XZ;
                     }
                     else
                     {
                         m_asm = null;
                     }
                 }
                 if (m_relations[i].METHOD_NAME.Contains("VMAS"))
                 {
                     //BLL.DEV_STANDARD_VMAS_BLL bllVmas = new BLL.DEV_STANDARD_VMAS_BLL();
                     //DEV_STANDARD_VMAS[] arrVmas = bllVmas.GetModelList(condition);
                     m_vmas = m_db.Find <DEV_STANDARD_VMAS>(key, model);
                     if (m_vmas.ID > 0)
                     {
                         m_EditHCXZ.Text   = m_vmas.COXZ;
                         m_EditCOXZ.Text   = m_vmas.HCXZ;
                         m_EditNOXZ.Text   = m_vmas.NOXZ;
                         m_EditHCNOXZ.Text = m_vmas.HC_NOXZ;
                     }
                     else
                     {
                         m_vmas = null;
                     }
                 }
                 if (m_relations[i].METHOD_NAME.Contains("SDS"))
                 {
                     m_sds = m_db.Find <DEV_STANDARD_SDS>(key, model);
                     if (m_sds.ID > 0)
                     {
                         m_EditGDSCO.Text = m_sds.GDSCOXZ;
                         m_EditGDSHC.Text = m_sds.GDSHCXZ;
                         m_EditDSCO.Text  = m_sds.DSCOXZ;
                         m_EditDSHC.Text  = m_sds.DSHCXZ;
                         m_EditLXX.Text   = m_sds.GLKQXSXX;
                         m_EditLSX.Text   = m_sds.GLKQXSSX;
                     }
                     else
                     {
                         m_sds = null;
                     }
                 }
                 if (m_relations[i].METHOD_NAME.Contains("LD"))
                 {
                     m_ld = m_db.Find <DEV_STANDARD_LD>(key, model);
                     if (m_ld.ID > 0)
                     {
                         m_EditGXSXS.Text = m_ld.GXSXSXZ;
                         m_EditGLXZ.Text  = m_ld.GLXZ;
                         m_EditZSXZ.Text  = m_ld.ZSXZ;
                         m_EditLDNO.Text  = m_ld.NOXZ;
                         m_EditLGM.Text   = m_ld.LGMXZ;
                         m_EditHSU.Text   = m_ld.HSUXZ;
                     }
                     else
                     {
                         m_ld = null;
                     }
                 }
                 if (m_relations[i].METHOD_NAME.Contains("FA"))
                 {
                     m_fa = m_db.Find <DEV_STANDARD_ZYJS>(key, model);
                     if (m_fa.ID > 0)
                     {
                         m_EditFaBTG.Text  = m_fa.ZYJSXZ;
                         m_EditBTGHSU.Text = m_fa.HSUXZ;
                     }
                     else
                     {
                         m_fa = null;
                     }
                 }
             }
         }
     }
 }