public OsPayOffData SelectOsPayOff(int slipNo) { SqlHandling sh = new SqlHandling("D_OsPayOff"); DataTable dt = sh.SelectAllData("WHERE SlipNo = " + slipNo); if (dt == null || dt.Rows.Count < 1) { return(null); } OsPayOffData pod = new OsPayOffData(dt.Rows[0]); return(pod); }
public TaskNoteData SelectTaskNoteDate(int taskID) { SqlHandling sh = new SqlHandling("D_TaskNote"); DataTable dt = sh.SelectAllData("WHERE TaskID = " + taskID); if (dt == null || dt.Rows.Count < 1) { return(null); } TaskNoteData tnd = new TaskNoteData(dt.Rows[0]); return(tnd); }
public DataTable SelectPayOff(DateTime reportDate, string officeCode, string department, string costCode) { string sqlStr = " * FROM D_OsPayOff " + "WHERE OfficeCode = '" + officeCode + "' AND Department = '" + department + "' AND ItemCode = '" + costCode + "' AND ReportDate = '" + reportDate + "'"; SqlHandling sh = new SqlHandling(); DataTable dt = sh.SelectFull_Core(sqlStr);; if (dt == null || dt.Rows.Count < 1) { return(null); } return(dt); }
private OsWkDetailData loadOsWkDetail(int slipNo, int costReportID) { SqlHandling sh = new SqlHandling("D_OsWkDetail"); DataTable dt = sh.SelectAllData("WHERE SlipNo = " + slipNo + " AND CostReportID = " + costReportID); if (dt == null || dt.Rows.Count < 1) { return(null); } OsWkDetailData wdd = new OsWkDetailData(dt.Rows[0]); return(wdd); }
public OsPayOffNoteData SelectPayOffNote(DateTime reportDate, string officeCode, string itemCode) { SqlHandling sh = new SqlHandling("D_OsPayOffNote"); DataTable dt = sh.SelectAllData("WHERE OfficeCode = '" + officeCode + "' AND ItemCode = '" + itemCode + "' AND ReportDate = '" + reportDate + "'"); if (dt == null || dt.Rows.Count < 1) { return(null); } OsPayOffNoteData pod = new OsPayOffNoteData(dt.Rows[0]); return(pod); }
private int editTaskIndDataItem(string sqlStr, string retVal) { SqlHandling sh = new SqlHandling(); DataTable dt = sh.SelectFullDescription(sqlStr); if (dt == null || dt.Rows.Count < 1) { return(-1); } DataRow dr = dt.Rows[0]; return(Convert.ToInt32(dr[retVal])); }
public TaskIndData SelectTaskIndData(int taskID, string officeCode, string department) { TaskIndData tid = new TaskIndData(); SqlHandling sh = new SqlHandling("D_TaskInd"); DataTable dt = sh.SelectAllData("WHERE TaskID = " + taskID + " AND OfficeCode = '" + officeCode + "' AND Department = '" + department + "'"); if (dt == null || dt.Rows.Count < 1) { return(null); } tid = new TaskIndData(dt.Rows[0]); return(tid); }
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 TaskIndData SelectTaskIndData(string taskCode) { TaskIndData tid = new TaskIndData(); SqlHandling sh = new SqlHandling("D_TaskInd"); DataTable dt = sh.SelectAllData("WHERE TaskCode = '" + taskCode + "'"); if (dt == null || dt.Rows.Count < 1) { return(null); } tid = new TaskIndData(dt.Rows[0]); return(tid); }
public CostData SelectCostMaster(string memberCode, string officeCode, string subject) { SqlHandling sh = new SqlHandling("M_Cost"); DataTable dt = sh.SelectAllData("WHERE MemberCode = '" + memberCode + "' AND OfficeCode = '" + officeCode + "' AND CostCode LIKE '" + subject + "%'"); if (dt == null || dt.Rows.Count < 1) { return(null); } CostData cd = new CostData(dt.Rows[0]); return(cd); }
public CostData SelectCostMaster(string wParam) { SqlHandling sh = new SqlHandling("M_Cost"); DataTable dt = sh.SelectAllData("WHERE " + wParam); if (dt == null || dt.Rows.Count < 1) { return(null); } CostData cd = new CostData(dt.Rows[0]); return(cd); }
public CostData SelectCostMaster(string costCode, string officeCode) { SqlHandling sh = new SqlHandling("M_Cost"); DataTable dt = sh.SelectAllData("WHERE CostCode = '" + costCode + "' AND OfficeCode = '" + officeCode + "'"); if (dt == null || dt.Rows.Count < 1) { return(null); } CostData cd = new CostData(dt.Rows[0]); return(cd); }
public TaskCodeNameData SelectTaskCodeNameData(string taskCode, string officeCode) { SqlHandling sh = new SqlHandling("D_TaskInd"); DataTable dt = sh.SelectAllData("WHERE OldVerMark = 0 AND TaskCode = '" + taskCode + "' AND OfficeCode = '" + officeCode + "'"); if (dt == null || dt.Rows.Count < 1) { return(null); } TaskCodeNameData tcd = new TaskCodeNameData(dt.Rows[0]); return(tcd); }
public MembersScData SelectMembersScDataS(string memberCode) { SqlHandling sh = new SqlHandling("M_Members"); DataTable dt = sh.SelectAllData("WHERE MemberCode = '" + memberCode + "'"); if (dt == null || dt.Rows.Count < 1) { return(null); } MembersScData msd = new MembersScData(dt.Rows[0]); return(msd); }
public TaskData SelectTaskData(string taskCode) { SqlHandling sh = new SqlHandling("D_Task"); DataTable dt = sh.SelectAllData("WHERE OldVerMark = 0 AND TaskBaseCode = '" + DHandling.NumberOfCharacters(taskCode, 1) + "'"); if (dt == null || dt.Rows.Count < 1) { return(null); } TaskData td = new TaskData(dt.Rows[0]); return(td); }
public DateTime SelectCloseDate(string officeCode) { SqlHandling sh = new SqlHandling("M_Common"); DataTable dt = sh.SelectAllData(" WHERE Kind = 'CLS" + officeCode + "'"); if (dt == null) { return(DateTime.MinValue); } DataRow dr = dt.Rows[0]; ComSignage = Convert.ToString(dr["ComSignage"]); return(Convert.ToDateTime(dr["ComData"])); }
public int SelectOsWkReportID(int slipNo) { string sqlStr = " DISTINCT OsWkReportID FROM D_OsWkDetail WHERE SlipNo = " + slipNo; SqlHandling sh = new SqlHandling(); DataTable dt = sh.SelectFull_Core(sqlStr); if (dt == null || dt.Rows.Count < 1) { return(0); } DataRow dr = dt.Rows[0]; return(Convert.ToInt32(dr["OsWkReportID"])); }
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); }
private bool selectExclusiveData(string sqlStr) { SqlHandling sh = new SqlHandling("M_Exclusive"); DataTable dt = sh.SelectAllData(sqlStr); //return ( dt == null ) ? false : true; if (dt == null) { return(false); } DataRow dr = dt.Rows[0]; UserName = Convert.ToString(dr["UserName"]); return(true); }
public int CountSlipNo(DateTime dateFr, DateTime dateTo, string taskCode, string officeCode, string department) { string sqlStr = " COUNT(DISTINCT SlipNo) AS sNC FROM D_CostReport WHERE OfficeCode = '" + officeCode + "' AND Department = '" + department + "' AND TaskCode = '" + taskCode + "' AND ( ReportDate BETWEEN '" + dateFr.StripTime() + "' AND '" + dateTo.StripTime() + "')"; SqlHandling sh = new SqlHandling(); DataTable dt = sh.SelectFull_Core(sqlStr); if (dt == null || dt.Rows.Count < 1) { return(0); } DataRow dr = dt.Rows[0]; return(Convert.ToInt32(dr["sNC"])); }
public DataTable SelectMembersData() { SqlHandling sh = new SqlHandling("M_Members"); DataTable dt = sh.SelectAllData("WHERE Enrollment = 0"); if (dt == null) { return(null); } if (dt.Rows.Count == 0) { return(null); } return(dt); }
public DataTable SelectMembersData(string officeCode) { SqlHandling sh = new SqlHandling("M_Members"); DataTable dt = sh.SelectAllData("WHERE Enrollment = 0 AND OfficeCode = '" + officeCode + "'"); if (dt == null) { return(null); } if (dt.Rows.Count == 0) { return(null); } return(dt); }
public bool TableData(string table, string vItem, string dItem, int aLevel) { if (aLevel > 1111) { aLevel = 1111; } int[] lvlArray = new int[4]; int[] paraArray = new int[] { 1000, 100, 10, 1 }; int rCount = 0; for (int i = 0; i < lvlArray.Length; i++) { lvlArray[i] = aLevel / paraArray[i]; aLevel = aLevel % paraArray[i]; rCount += lvlArray[i]; } if (rCount == 0) { emptyComboBox(); return(Basic()); } valItem = new string[rCount]; dispItem = new string[rCount]; SqlHandling sh = new SqlHandling(table); DataTable dt = sh.SpecifiedData(vItem, dItem); if (dt == null) { emptyComboBox(); return(Basic()); } DataRow dr; int idx = 0; for (int i = 0; i < dt.Rows.Count; i++) { if (lvlArray[i] == 1) { dr = dt.Rows[i]; valItem[idx] = Convert.ToString(dr[vItem]); dispItem[idx] = Convert.ToString(dr[dItem]); idx++; } } return(Basic()); }
public YearVolumeData[] SelectYearVolume(string officeCode, string department, int yymm) { SqlHandling sh = new SqlHandling("D_YearVolume"); DataTable dt = sh.SelectAllData("WHERE OfficeCode = '" + officeCode + "' AND Department = '" + department + "' AND YearMonth = " + yymm); if (dt == null || dt.Rows.Count == 0) { return(null); } YearVolumeData[] yVolA = new YearVolumeData[dt.Rows.Count]; for (int i = 0; i < dt.Rows.Count; i++) { yVolA[i] = new YearVolumeData(dt.Rows[i]); } return(yVolA); }
public YearVolumeData SelectSummaryYearVolume(string officeCode, string department, int yymm) { SqlHandling sh = new SqlHandling(); DataTable dt = sh.SelectFullDescription(sumPara + " OfficeCode = '" + officeCode + "' AND Department = '" + department + "' AND YearMonth = " + yymm); if (dt.Rows.Count == 0) { return(null); } DataRow dr = dt.Rows[0]; YearVolumeData yvold = setYearVolumeData(dr); yvold.OfficeCode = officeCode; yvold.Department = department; return(yvold); }
public int SelectCostSlipNo(DateTime reportDate, string taskCode, string subCoCode, string officeCode, string department) { string sqlStr = " DISTINCT SlipNo FROM D_CostReport WHERE ReportDate = '" + reportDate + "' AND TaskCode = '" + taskCode + "' AND OfficeCode = '" + officeCode + "' AND Department = '" + department + "' AND SubCoCode = '" + subCoCode + "'"; SqlHandling sh = new SqlHandling(); DataTable dt = sh.SelectFull_Core(sqlStr); if (dt == null || dt.Rows.Count < 1) { return(0); } DataRow dr = dt.Rows[0]; return(Convert.ToInt32(dr["SlipNo"])); }
public DataTable SelectWorkReportMembersData(string officeCode, string department) { SqlHandling sh = new SqlHandling("M_Members"); // MemberType < 2 社員および作業内訳書入力作業員 DataTable dt = sh.SelectAllData("WHERE Enrollment = 0 AND MemberType < 2 AND OfficeCode = '" + officeCode + "' AND Department = '" + department + "'"); if (dt == null) { return(null); } if (dt.Rows.Count == 0) { return(null); } return(dt); }
public bool TableDataForCostData(string dItem, string strSql) { SqlHandling sh = new SqlHandling(); DataTable dt = sh.SelectFullDescription(strSql); if (dt == null) { return(false); } if (!SetValueDt(dt, dItem)) { return(false); } return(Basic()); }
//--------------------------------------------------------// // Method //--------------------------------------------------------// public OfficeData SelectOfficeData(string officeCode) { SqlHandling sh = new SqlHandling("M_Office"); DataTable dt = sh.SelectAllData("WHERE OfficeCode = '" + officeCode + "'"); if (dt == null) { return(null); } if (dt.Rows.Count == 0) { return(null); } OfficeData od = new OfficeData(dt.Rows[0]); return(od); }
//--------------------------------------------------------// // Method //--------------------------------------------------------// public string SelectMemberName(string mCode) { SqlHandling sh = new SqlHandling(); DataTable dt = sh.SelectFullDescription(" Name FROM M_Members WHERE MemberCode = '" + mCode + "'"); if (dt == null) { return(""); } if (dt.Rows.Count == 0) { return(""); } DataRow dr = dt.Rows[0]; return(Convert.ToString(dr["Name"])); }