本文整理汇总了C#中SQLDB.updateTimekeeperHoursAndSymbols方法的典型用法代码示例。如果您正苦于以下问题:C# SQLDB.updateTimekeeperHoursAndSymbols方法的具体用法?C# SQLDB.updateTimekeeperHoursAndSymbols怎么用?C# SQLDB.updateTimekeeperHoursAndSymbols使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SQLDB
的用法示例。
在下文中一共展示了SQLDB.updateTimekeeperHoursAndSymbols方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Save_Click
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());
}