Exemplo n.º 1
0
        private bool CheckApproved(TimesheetTotals tot, string type)
        {
            int    empID = tot.EmployeeID;
            string sql   = "SELECT * FROM Timesheet WHERE EmployeeID = " + empID;

            using (clsDataGetter dg = new clsDataGetter(CommonProcs.WCompanyConnStr))
            {
                switch (type)
                {
                case "SUP":
                    sql += " AND SupApprove = 0";
                    break;

                case "OM":
                    sql += " AND OMApprove = 0";
                    break;

                case "HO":
                    sql += " AND HOApprove = 0";
                    break;
                }
                if (dg.HasData(sql))
                {
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
        }
Exemplo n.º 2
0
        private bool CheckCompleteForRecap()
        {
            DateTime weekEnding = this.dtpWeekEnding.Value;
            string   sql        = "SELECT * FROM Timesheet ";

            sql += " WHERE WeekEnding = '" + weekEnding.ToShortDateString() + "' ";
            sql += "AND Complete = 0";
            using (clsDataGetter dg = new clsDataGetter(CommonProcs.WCompanyConnStr))
            {
                if (dg.HasData(sql))
                {
                    return(false);
                }
            }
            return(true);
        }