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