Пример #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
        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
        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
        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
        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
        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
        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"]));
        }