private void btnAccept_Click(object sender, System.EventArgs e) { Task task = new Task(); try { task.DealTask(TaskID,1,Username,Date); task = null; Response.Write("<script language=javascript>alert('������ܲ����ɹ�!');window.dialogArguments.location='TaskList.aspx?displayType="+UDS.SubModule .Schedule.TaskList.displayType.ToString()+"';window.close();</script>"); } catch(Exception ex) { UDS.Components.Error .Log(ex.ToString()); Server.Transfer("../Error.aspx"); } }
private void lnkbtnFinish_Click(object sender, System.EventArgs e) { string Username = (string)Session["Username"]; string ids = ""; foreach(DataGridItem dgi in this.dgList .Items) { CheckBox cb=(CheckBox)(dgi.Cells[0].Controls[1]); if (cb.Checked==true) { ids += dgList.DataKeys[dgi.ItemIndex].ToString()+","; } } if(ids!="") { ids = ids.Substring(0,ids.Length-1); Task task = new Task(); try { task.DealTask(ids,2,Username,DateTime.Today.ToShortDateString()); Response.Write("<script language=javascript>alert('�����ɹ�!');window.location='TaskList.aspx';</script>"); //Response.AddHeader("Refresh","1"); } catch(Exception ex) { UDS.Components .Error.Log(ex.ToString()); Server.Transfer("../Error.aspx"); } } }