public string GetCallbackResult() { //SAPDB db = new SAPDB(); Display disp = new Display(); //List<Employee> emps = db.getEmployeeListForCurrentDepartment(StartDateOfPeriod, EndDateOfPeriod, "00000050", "1", eventArgument); EmployeeList emp_list = new EmployeeList(); List<Employee> emps = null;// emp_list.getEmployeesOfDepartment(eventArgument, employees); EmployeeComparerByPostASC cmpByPostASC = new EmployeeComparerByPostASC(); emps.Sort(cmpByPostASC); string html = ""; html += eventArgument; html += "||"; //int k = 0; //for (int j = 0; j < 100; j++) /*foreach (Employee em in emps) { //k++; html += "<table cellpadding='0' cellspacing='0' border='0' class='employee'><tr><td class='employee_post'><div style='width: 105px; height: 80px; overflow: hidden;'>" + em.Post + "</div></td><td class='employee_id'>" + em.EmployeeID + "</td><td class='employee_name' ><img src='App_Resources/person.gif' style='cursor: hand; cursor: pointer;'> <span style='cursor: hand; cursor: pointer;' onclick='window.open(\"" + getCardUrl(em) + "\",\"_blank\",\"menubar=no,width=800,height=600,resizable=yes,scrollbars=yes\")'>" + em.FullName + CheckRedundantEmployee(em) + "</span></td><td>" + disp.DisplaySchedules(count_days, 18, em, em.PostID, eventArgument, hours, overhours, em.Schedule, em.ScheduleDeflection, role, check, closed, false) + "</td></tr></table>"; } */ html += "||"; DevDescriptionDB devDB = new DevDescriptionDB(); List<DevDescription> devdescription = devDB.getDevDescription(); html += "<table cellpadding='0' cellspacing='0' border='0' width='100%'><tr><td align='center' colspan='2'><b>����������� � SAP</b></td></tr>"; foreach (DevDescription dev in devdescription) html += "<tr><td width='30px' align='center'><b>" + dev.Symbols + "</b></td><td>" + dev.Name + "</td></tr>"; html += "</table>"; return html; }
protected void Save_Click(object sender, ImageClickEventArgs e) { //Response.Write(Request.Form["test"]); Person user = (Person)Session["User"]; PeriodDB perdb = new PeriodDB(); Period per = perdb.getPeriod(Convert.ToInt32(this.month), Convert.ToInt32(this.year)); if (this.employees != null) { DepartmentList department_list = new DepartmentList(); List<Department> departments = department_list.getDepartments(employees); foreach (Department dep in departments) { EmployeeList emp_list = new EmployeeList(); List<Employee> emps = null;//// emp_list.getEmployeesOfDepartment(dep.DepartmentID, employees); EmployeeComparerByPostASC cmpByPostASC = new EmployeeComparerByPostASC(); emps.Sort(cmpByPostASC); foreach (Employee em in emps) { EmployeeList emplist = new EmployeeList(); List<TimekeeperHours> current = null;//emplist.getEmployeesTimekeeperHours(em); List<HRHours> hr_current = null;/// emplist.getEmployeesHRHours(em); for (int i = 1; i <= count_days; i++) { string textbox_id = "tb" + dep.DepartmentID + em.PostID + em.EmployeeID + i.ToString(); //string hr_id = "hr" + dep.DepartmentID + em.EmployeeID + i.ToString(); Date dt = new Date(); SQLDB db = new SQLDB(); string hour = Request.Form[textbox_id]; //string overhour = Request.Form[hr_id]; TimekeeperHours th = current.Find(delegate(TimekeeperHours ht) { return ht.Day == i.ToString(); }); decimal h = -1; string sym = ""; if ((hour != "") && (hour != null)) { if (HasSymbols(hour)) { if (th == null) db.insertTimekeeperHoursAndSymbols(em.EmployeeID, em.StartPeriod, em.BeginDate, em.EndDate, h, hour, user.TabNum, dep.DepartmentID, em.PostID, i.ToString(), month, year, per.PeriodID); else if (!th.Symbols.Equals(hour)) db.updateTimekeeperHoursAndSymbols(user.TabNum, h, hour, th.ID); } else { h = Convert.ToDecimal(hour); if (th == null) db.insertTimekeeperHoursAndSymbols(em.EmployeeID, em.StartPeriod, em.BeginDate, em.EndDate, h, sym, user.TabNum, dep.DepartmentID, em.PostID, i.ToString(), month, year, per.PeriodID); else if (th.Hours != h) db.updateTimekeeperHoursAndSymbols(user.TabNum, h, sym, th.ID); } } if ((hour == "") && (th != null)) db.deleteTimekeeperHours(th.ID); } } } } EncryptedQueryString QueryString = new EncryptedQueryString(); QueryString.Add("month", period.SelectedItem.Value); QueryString.Add("role", role); //Server.Transfer("TimeTable.aspx?data=" + QueryString.ToString()); //Response.Redirect("Tabel.aspx?data=" + QueryString.ToString()); }