示例#1
0
 public static bool GetCom_MEMain(Com_PartOperation cCom_PartOperation, out Com_MEMain com_MEMain)
 {
     com_MEMain = new Com_MEMain();
     try
     {
         com_MEMain = session.QueryOver <Com_MEMain>().Where(x => x.comPartOperation == cCom_PartOperation).SingleOrDefault <Com_MEMain>();
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("取得Com_MEMain失敗");
         return(false);
     }
     return(true);
 }
示例#2
0
 public static bool GetCom_FixInspection(Com_PartOperation cCom_PartOperation, string partName, out Com_FixInspection cCom_FixInspection)
 {
     cCom_FixInspection = new Com_FixInspection();
     try
     {
         cCom_FixInspection = session.QueryOver <Com_FixInspection>()
                              .Where(x => x.comPartOperation == cCom_PartOperation)
                              .And(x => x.fixPartName == partName).SingleOrDefault();
     }
     catch (System.Exception ex)
     {
         return(false);
     }
     return(true);
 }
示例#3
0
 public static bool GetCom_PartOperation(Com_PEMain cCom_PEMain, string op1, out Com_PartOperation cCom_PartOperation)
 {
     cCom_PartOperation = new Com_PartOperation();
     try
     {
         cCom_PartOperation = session.QueryOver <Com_PartOperation>()
                              .Where(x => x.comPEMain == cCom_PEMain)
                              .Where(x => x.operation1 == op1).SingleOrDefault <Com_PartOperation>();
         if (cCom_PartOperation == null)
         {
             MessageBox.Show("資料庫無此製程序");
             return(false);
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("查找失敗,請檢查連線狀態");
         return(false);
     }
     return(true);
 }