public static string getdata(string companyid, string fromdate, string todate, string status, string schtype, string client, string project) { ClsTimeSheet objts = new ClsTimeSheet(); DataSet ds = new DataSet(); GeneralMethod objgen = new GeneralMethod(); ClsScheduleBAL objSch = new ClsScheduleBAL(); objts.nid = ""; objts.action = "selectgroup"; objts.companyId = companyid; objts.from = fromdate; objts.to = todate; objts.clientid = client; objts.projectid = project; objts.empid = ""; objts.Status = status; objts.remark = schtype; ds = objts.schedule(); string result = ""; DataTable dtbyItem = new DataTable(); var cWeek = DateRange.getLastDates("Current Week"); var NWeek = DateRange.getLastDates("Next Week"); dtbyItem = objgen.filterTable("date>=#01/01/" + (DateTime.Now.Year - 1).ToString() + "# and date<=#12/31/" + (DateTime.Now.Year - 1).ToString() + "#", ds.Tables[0]); result = objSch.scheduleHTML(dtbyItem, "Previous Year Schedules", "pys"); dtbyItem = objgen.filterTable("date>=#01/01/" + DateTime.Now.Year.ToString() + "# and date<#" + cWeek.fromdate + "#", ds.Tables[0]); result = result + objSch.scheduleHTML(dtbyItem, "Older Schedules", "os"); dtbyItem = objgen.filterTable("date>=#" + cWeek.fromdate + "# and date<=#" + cWeek.todate + "#", ds.Tables[0]); result = result + objSch.scheduleHTML(dtbyItem, "Current Week Schedules", "cv"); dtbyItem = objgen.filterTable("date>=#" + NWeek.fromdate + "# and date<=#" + NWeek.todate + "#", ds.Tables[0]); result = result + objSch.scheduleHTML(dtbyItem, "Next Week Schedules", "nv"); dtbyItem = objgen.filterTable("date>#" + NWeek.todate + "#", ds.Tables[0]); result = result + objSch.scheduleHTML(dtbyItem, "Upcoming Schedules", "uc"); return(result); }
public string getToDoList(string empid) { DataAccess objda = new DataAccess(); empTimeSheet.DataClasses.BAL.ClsToDoListBAL objtodo = new empTimeSheet.DataClasses.BAL.ClsToDoListBAL(); GeneralMethod objgen = new GeneralMethod(); string result = ""; objda.empid = empid; objda.id = ""; objda.action = "select"; string tDay = ""; try { ds = objda.ToDoList(); tDay = ds.Tables[1].Rows[0]["empdate"].ToString(); DataTable dtbyItem = new DataTable(); //Fill Today List if (ds.Tables[0].Rows.Count > 0) { dtbyItem = objgen.filterTable("date1=#" + tDay + "#", ds.Tables[0]); result = objtodo.todayHTML(dtbyItem, "Today's Tasks", "t"); dtbyItem = objgen.filterTable("date1>#" + tDay + "#", ds.Tables[0]); result = result + objtodo.upComingHTML(dtbyItem, "Upcoming Tasks", "u"); dtbyItem = objgen.filterTable("date1<#" + tDay + "#", ds.Tables[0]); result = result + objtodo.upComingHTML(dtbyItem, "Previous Tasks", "p"); } else { result = "<div class='task-hding'>Today's Task</div> <div class='clear'></div><div class='notodaytask'>No task exists.</div>"; } } catch (Exception ex) { result = ex.ToString(); } return(result); }
public static string getRoleHTML() { DataAccess objda = new DataAccess(); DataSet ds = new DataSet(); GeneralMethod objgen = new GeneralMethod(); objda.id = ""; objda.name = ""; objda.action = "getallroles"; ds = objda.ManageRoleGroup(); StringBuilder sb = new StringBuilder(); string result = ""; int num = 0; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { if (num == 0) { result += "<tr>"; } result += "<td> <div class='roleheader color'>" + ds.Tables[0].Rows[i]["rGroup"].ToString() + "</div><div class='roleBox'>"; DataTable dtbyInt = new DataTable(); dtbyInt = objgen.filterTable("rGroup='" + ds.Tables[0].Rows[i]["rGroup"].ToString() + "'", ds.Tables[1]); for (int j = 0; j < dtbyInt.Rows.Count; j++) { result += "<div><input type='checkbox' name='chkrole' value='" + dtbyInt.Rows[j]["nid"].ToString() + "' /><span>" + dtbyInt.Rows[j]["roleName"].ToString() + "</span></div>"; } result += "</div></td>"; if (num == 2) { result += "</tr>"; num = 0; } else { num = num + 1; } } return(result); }