예제 #1
0
 /// <summary>
 /// 新增数据 ,若不存在直接建表建库
 /// </summary>
 /// <param 数据对象="baseProfile"></param>
 /// <param 表名="tableName"></param>
 /// <returns></returns>
 public result AddReflowerTesterProfile(ReflowerTesterProfile baseProfile, string tableName)
 {
     if (baseProfile == null)
     {
         return(result.fail);
     }
     if (!AccessDBBase.ExistMysqlDB())
     {
         return(result.notFoundMySql);
     }
     if (RTDBApply.CreateTable(tableName))
     {
         if (RTDBApply.InsertBaseProfile(tableName, baseProfile.Line, baseProfile.ReflowerName, baseProfile.ProductName, baseProfile.StartTime, baseProfile.EndTime, baseProfile.TechnologyType, baseProfile.TechnologyName, baseProfile.ProcessName, baseProfile.ReflowerTechName, baseProfile.SolderName, baseProfile.PtsFileName, baseProfile.PtsFilePath, baseProfile.ImgPath))
         {
             return(result.success);
         }
         else
         {
             return(result.fail);
         }
     }
     else
     {
         return(result.fail);
     }
 }
예제 #2
0
 public bool RemoveData_baseProfile(string tableName, string line, string productName, string beginTime, string overTime)
 {
     if (RTDBApply.DeleteData_baseProfile(tableName, line, productName, beginTime, overTime))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #3
0
 public bool RemoveData_baseProfile(string tableName, string lineOrProductName, bool isLine)
 {
     if (RTDBApply.DeleteData_baseProfile(tableName, lineOrProductName, isLine))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #4
0
 public bool ReadDataTable_baseProfile_t(string tableName, string beginTime, string overTime, out DataTable dt)
 {
     dt = RTDBApply.SelectDataTable_baseProfile_t(tableName, beginTime, overTime);
     if (dt == null || dt.Rows.Count == 0)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
예제 #5
0
 /// <summary>
 /// 查询所有的产名(去重)
 /// </summary>
 /// <param 表名="tableName"></param>
 /// <param 结果集="listStr"></param>
 /// <returns></returns>
 public bool ReadAllProductName(string tableName, out List <string> listStr)
 {
     listStr = RTDBApply.SelectAllLineData(tableName, "ProductName");
     if (listStr == null || listStr.Count == 0)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
예제 #6
0
 public bool ReadDataTable_baseProfileUsePage(string tableName, string line, string productName, string beginTime, string overTime, string beginIndex, string num, out DataTable dt)
 {
     dt = RTDBApply.SelectDataTable_baseProfileUsePage(tableName, line, productName, beginTime, overTime, beginIndex, num);
     if (dt == null || dt.Rows.Count == 0)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
예제 #7
0
 /// <summary>
 /// 按条件查询数据(条件:产线、产品)
 /// </summary>
 /// <param 表名="tableName"></param>
 /// <param 产线名="line"></param>
 /// <param 产品名="productName"></param>
 /// <param 结果集="dt"></param>
 /// <returns></returns>
 public bool ReadDataTable_baseProfile(string tableName, string line, string productName, out DataTable dt)
 {
     dt = RTDBApply.SelectDataTable_baseProfile(tableName, line, productName);
     if (dt == null || dt.Rows.Count == 0)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }