public bool Version(string table, string param) { SqlHandling sh = new SqlHandling(table); DataTable dt = sh.SelectAllData(param); if (dt == null) { emptyComboBox(); return(Basic()); } //DataRow dr; //valItem = new string[dt.Rows.Count]; //dispItem = new string[dt.Rows.Count]; //for( int i = 0; i < dt.Rows.Count; i++ ) //{ // dr = dt.Rows[i]; // valItem[i] = Convert.ToString( i ); // dispItem[i] = Convert.ToString( dr["VersionNo"] ); //} if (SetValueDt(dt, "VersionNo") == false) { return(false); } return(Basic()); }
//--------------------------------------------------------// // Method //--------------------------------------------------------// public string NumberingOrder(string officeCode, string department) { string orderNo = department; if (officeCode != "H") { orderNo = "A"; } orderNo += util.TruncateByteRight(Convert.ToString(DHandling.FiscalYear(DateTime.Today)), 2); orderNo += officeCode; SqlHandling sh = new SqlHandling("M_Office"); DataTable dt = sh.SelectAllData("WHERE OfficeCode = '" + officeCode + "'"); if (dt == null) { return(null); } DataRow dr; dr = dt.Rows[0]; int orderSeqNo = Convert.ToInt32(dr["OrderSeqNo"]); orderSeqNo++; orderNo += orderSeqNo.ToString("000"); if (!office_Update(officeCode, orderSeqNo)) { return(null); } return(orderNo); }
private TaskCodeNameData[] cleateTaskEntryNameData(string sqlString) { SqlHandling sh = new SqlHandling("D_TaskEntry"); DataTable dt = sh.SelectAllData(sqlString); if (dt == null || dt.Rows.Count < 1) { return(null); } TaskCodeNameData[] tcd = new TaskCodeNameData[dt.Rows.Count]; DataRow dr; for (int i = 0; i < dt.Rows.Count; i++) { tcd[i] = new TaskCodeNameData(dt.Rows[i]); dr = dt.Rows[i]; string wkTaskCode = Convert.ToString(dr["TaskCode"]).Trim(); tcd[i].TaskCode = Convert.ToString(dr["TaskCode"]).Trim(); tcd[i].TaskName = Convert.ToString(dr["TaskName"]); tcd[i].LeaderMCode = Convert.ToString(dr["LeaderMCode"]); tcd[i].OfficeCode = Convert.ToString(dr["OfficeCode"]); tcd[i].TaskID = Convert.ToInt32(dr["TaskEntryID"]); tcd[i].TaskIndID = Convert.ToInt32(dr["TaskIndID"]); tcd[i].Partner = Convert.ToString(dr["PartnerCode"]); } return(tcd); }
private OsPaymentData loadOsPayment(int slipNo) { SqlHandling sh = new SqlHandling("D_OsPayment"); DataTable dt = sh.SelectAllData("WHERE SlipNo = " + slipNo); if (dt == null || dt.Rows.Count < 1) return null; OsPaymentData pmd = new OsPaymentData(dt.Rows[0]); return pmd; }
//--------------------------------------------------------// // Method //--------------------------------------------------------// public DataTable SelectCommonData(string comKind) { SqlHandling sh = new SqlHandling("M_Common"); DataTable dt = sh.SelectAllData(" WHERE Kind = '" + comKind + "'"); if (dt == null || dt.Rows.Count == 0) { return(null); } return(dt); }
public DataTable SelectAuthMaster() { SqlHandling sh = new SqlHandling("M_Authorization"); DataTable dt = sh.SelectAllData("ORDER BY AuthID"); if (dt == null || dt.Rows.Count < 1) { return(null); } return(dt); }
public DataTable SelectAllData_Core(string tblNam, string wPar) { SqlHandling sh = new SqlHandling(tblNam); DataTable dt = sh.SelectAllData(wPar); if (dt == null) { return(null); } //if ( dt.Rows.Count == 0 ) return null; return(dt); }
public string SelectCostName(string costCode) { SqlHandling sh = new SqlHandling("M_Cost"); DataTable dt = sh.SelectAllData("WHERE CostCode = '" + costCode + "'"); if (dt == null || dt.Rows.Count < 1) { return(null); } DataRow dr = dt.Rows[0]; return(Convert.ToString(dr["Item"])); }
private VolumeData loadVolume(int volumeID) { SqlHandling sh = new SqlHandling("D_Volume"); DataTable dt = sh.SelectAllData("WHERE VolumeID = " + volumeID); if (dt == null || dt.Rows.Count < 1) { return(null); } VolumeData vd = new VolumeData(dt.Rows[0]); return(vd); }
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 TaskIndData SelectTaskIndSData(string wParam) { TaskIndData tid; SqlHandling sh = new SqlHandling("D_TaskInd"); DataTable dt = sh.SelectAllData(wParam); if (dt == null || dt.Rows.Count < 1) { return(null); } tid = new TaskIndData(dt.Rows[0]); return(tid); }
//--------------------------------------------------------// // Method //--------------------------------------------------------// public PartnersData SelectPartnersData(string partnerCode) { SqlHandling sh = new SqlHandling("M_Partners"); DataTable dt = sh.SelectAllData("WHERE PartnerCode = '" + partnerCode + "'"); if (dt == null || dt.Rows.Count < 1) { return(null); } PartnersData pd = new PartnersData(dt.Rows[0]); return(pd); }
private WorkReportData loadWorkReport(int slipNo) { SqlHandling sh = new SqlHandling("D_WorkReport"); DataTable dt = sh.SelectAllData("WHERE SlipNo = " + slipNo); if (dt == null || dt.Rows.Count < 1) { return(null); } WorkReportData wrd = new WorkReportData(dt.Rows[0]); return(wrd); }
public TaskEntryData SelectTaskEntryData(int taskEntryID) { TaskEntryData ted = new TaskEntryData(); SqlHandling sh = new SqlHandling("D_TaskEntry"); DataTable dt = sh.SelectAllData("WHERE TaskEntryID = " + taskEntryID); if (dt == null || dt.Rows.Count < 1) { return(null); } ted = new TaskEntryData(dt.Rows[0]); return(ted); }
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 MembersData SelectMembersDataAll(string mCode) { SqlHandling sh = new SqlHandling("M_Members"); DataTable dt = sh.SelectAllData("WHERE MemberCode = '" + mCode + "'"); if (dt == null) { return(null); } MembersData rmd = new MembersData(dt.Rows[0]); return(rmd); }
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); }
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 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 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 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 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 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 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 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 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 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 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 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); }