public static bool SetOpVerData(Sys_Customer customerSrNo, string partNo, string cusVer, ComboBoxEx OpVerCombobox)
 {
     try
     {
         //IList<Com_PEMain> comPEMain = session.QueryOver<Com_PEMain>()
         //                              .Where(x => x.sysCustomer == customerSrNo)
         //                              .Where(x => x.partName == partNo)
         //                              .Where(x => x.customerVer == cusVer)
         //                              .List<Com_PEMain>();
         IList <Com_PEMain> comPEMain1 = new List <Com_PEMain>();
         CaxSQL.GetListCom_PEMain(customerSrNo, partNo, cusVer, out comPEMain1);
         //CusVerCombobox.DisplayMember = "customerVer";
         //CusVerCombobox.ValueMember = "peSrNo";
         foreach (Com_PEMain i in comPEMain1)
         {
             if (OpVerCombobox.Items.Contains(i.opVer))
             {
                 continue;
             }
             OpVerCombobox.Items.Add(i.opVer);
         }
         //CusVerCombobox.Items.Add(comPEMain);
     }
     catch (System.Exception ex)
     {
         return(false);
     }
     return(true);
 }
 public static bool SetPartNoData(Sys_Customer customerSrNo, ComboBoxEx PartNoCombobox)
 {
     try
     {
         //MessageBox.Show(customerSrNo.customerSrNo.ToString());
         //IList<Com_PEMain> comPEMain = session.QueryOver<Com_PEMain>()
         //                              .Where(x => x.sysCustomer == customerSrNo)
         //                              .List<Com_PEMain>();
         IList <Com_PEMain> comPEMain1 = new List <Com_PEMain>();
         CaxSQL.GetListCom_PEMain(customerSrNo, out comPEMain1);
         foreach (Com_PEMain i in comPEMain1)
         {
             if (PartNoCombobox.Items.Contains(i.partName))
             {
                 continue;
             }
             PartNoCombobox.Items.Add(i.partName);
         }
     }
     catch (System.Exception ex)
     {
         return(false);
     }
     return(true);
 }