protected void Button1_Click(object sender, EventArgs e) { string sid = com.getsid("id"); string names = new Daiv_OA.UI.BasicPage().getvalue(2); if (sid != "-1") { string uid = "0"; DataTable dt = com.COM_Select("OA_Task", "Tlid", "", sid, "", 4); if (dt.Rows.Count != 0) { string uname = dt.Rows[0]["Manager"].ToString(); DataTable dts = com.COM_Select("OA_User", "Uname", "", uname, "", 4); if (dts.Rows.Count != 0) { uid = dts.Rows[0]["Uid"].ToString(); } } new Daiv_OA.BLL.TaskBLL().UpworkprogressTs(Workprogress.SelectedValue.ToString(), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), titlename.Text, Convert.ToInt32(sid)); switch (Workprogress.SelectedValue.ToString()) { case "5": Daiv_OA.BLL.OA_SysMessageIn.ADDsysMessage(5, "," + uid + ",", "请求任务验收", names + "提前完成了任务请您验收", "TastCheck.aspx?tast=45678"); break; case "6": Daiv_OA.BLL.OA_SysMessageIn.ADDsysMessage(5, "," + uid + ",", "请求任务验收", names + "完成了任务请您验收", "TastCheck.aspx?tast=45678"); break; case "7": Daiv_OA.BLL.OA_SysMessageIn.ADDsysMessage(5, "," + uid + ",", "请求任务验收", names + "未按时完成了任务阅读详细", "TastCheck.aspx?tast=45678"); break; case "8": Daiv_OA.BLL.OA_SysMessageIn.ADDsysMessage(8, "," + uid + ",", "请求任务验收", names + "申请工作协调新时间急需您安排新时间", "TastCheck.aspx?tast=45678"); break; case "9": Daiv_OA.BLL.OA_SysMessageIn.ADDsysMessage(5, "," + uid + ",", "请求任务验收", names + "拒收了您安排的任务阅读详细", "TastCheck.aspx?tast=9"); break; } } Response.Write("<script>parent.location.href='My_Task_List.aspx'</script>"); }
//保存设置 protected void Button1_Click(object sender, EventArgs e) { if (txtid.Text.Trim() != "") { int id = Convert.ToInt32(txtid.Text.Trim()); Daiv_OA.Entity.TaskEntity taskEntity = new Daiv_OA.BLL.TaskBLL().GetEntity(id); taskEntity.Nowtime = Convert.ToDateTime(this.txtBegintime.Text); taskEntity.Plantime = Convert.ToDateTime(this.txtEndtime.Text); taskEntity.Worktime = Convert.ToDateTime(this.txtEndtime.Text); taskEntity.Sumtime = Daiv_OA.BLL.TaskBLL.timespans(taskEntity.Nowtime, taskEntity.Plantime); taskEntity.Tlid = id; int uid = taskEntity.Uid; taskEntity.Workprogress = Convert.ToInt32(Workprogress.SelectedValue.ToString()); if (taskEntity.Nowtime > taskEntity.Plantime) { Tools.Common.JavaScript.MessageBox(this, "任务发布时间必须小于计划完成时间!"); } else { new BLL.TaskBLL().Update(taskEntity); string name = new Daiv_OA.UI.BasicPage().getvalue(2); if (Workprogress.SelectedValue.ToString() == "3")//验收此任务已完成 { Daiv_OA.BLL.OA_SysMessageIn.ADDsysMessage(6, "," + uid + ",", "验收结果", name + "验收结果显示您的任务已完成", "My_Work_Show.aspx?id=" + id); } else if (Workprogress.SelectedValue.ToString() == "4")//未及时完成 { Daiv_OA.BLL.OA_SysMessageIn.ADDsysMessage(6, "," + uid + ",", "验收结果", name + "验收结果显示您的任务未完成", "My_Work_Show.aspx?id=" + id); } else { Daiv_OA.BLL.OA_SysMessageIn.ADDsysMessage(8, "," + uid + ",", "验收结果", name + "已经重新安排了任务新时间", "My_Work_Show.aspx?id=" + id); } FinalMessage("任务验收执行成功", "TastCheck.aspx?tast=45678", 0); } } }