示例#1
0
        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());
        }
示例#2
0
        //--------------------------------------------------------//
        //      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);
        }
示例#3
0
        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);
        }
示例#4
0
 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;
 }
示例#5
0
        //--------------------------------------------------------//
        //      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);
        }
示例#6
0
        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);
        }
示例#7
0
文件: DbAccess.cs 项目: kyas21/FTB
        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);
        }
示例#8
0
        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"]));
        }
示例#9
0
        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);
        }
示例#10
0
        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);
        }
示例#11
0
        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);
        }
示例#12
0
文件: TaskIndData.cs 项目: kyas21/FTB
        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);
        }
示例#13
0
        //--------------------------------------------------------//
        //      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);
        }
示例#14
0
        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);
        }
示例#15
0
        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);
        }
示例#16
0
        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);
        }
示例#17
0
        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);
        }
示例#18
0
        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);
        }
示例#19
0
        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);
        }
示例#20
0
        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);
        }
示例#21
0
文件: TaskData.cs 项目: kyas21/FTB
        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);
        }
示例#22
0
        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);
        }
示例#23
0
        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);
        }
示例#24
0
文件: TaskIndData.cs 项目: kyas21/FTB
        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);
        }
示例#25
0
文件: TaskIndData.cs 项目: kyas21/FTB
        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);
        }
示例#26
0
        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"]));
        }
示例#27
0
        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);
        }
示例#28
0
        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);
        }
示例#29
0
        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);
        }
示例#30
0
        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);
        }