public TaskData SelectTaskData(int taskID, int oldVerMark) { SqlHandling sh = new SqlHandling("D_Task"); DataTable dt = sh.SelectAllData("WHERE OldVerMark = " + oldVerMark + " AND TaskID = " + taskID); if (dt == null || dt.Rows.Count < 1) { DMessage.DataNotExistence("D_Task TaskID = " + Convert.ToString(taskID)); return(null); } TaskData td = new TaskData(dt.Rows[0]); return(td); }
public TaskData SelectTaskData(string taskCode) { StringUtility str = new StringUtility(); SqlHandling sh = new SqlHandling("D_Task"); DataTable dt = sh.SelectAllData("WHERE TaskBaseCode = '" + str.SubstringByte(taskCode, 1, 6) + "'"); if (dt == null || dt.Rows.Count < 1) { DMessage.DataNotExistence("D_Task TaskBaseCode = " + str.SubstringByte(taskCode, 1, 6)); return(null); } TaskData td = new TaskData(dt.Rows[0]); return(td); }