protected void btnRead_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(Request.QueryString[ConstString.QueryString.CIRCULATE_ID])) { if (IsGoOnCirculate) { DoCirculate(); } String cyTB = TableName.GetCirculateTableName(base.TemplateName); B_Circulate l_burCirculate = new B_Circulate(cyTB); l_burCirculate.ID = SysConvert.ToInt32(Request.QueryString[ConstString.QueryString.CIRCULATE_ID]); l_burCirculate.Comment = this.ucGoOnCirculate.UCComment; l_burCirculate.Is_Read = true; Boolean l_blnIsSuccess = l_burCirculate.Save(); if (!l_blnIsSuccess) { JScript.Alert(SysString.GetErrMsgs(l_burCirculate.ErrMsgs)); return; } btnRead.Visible = false; base.ShowMsgBox(this.Page, MsgType.VbInformation, "处理成功", "3"); } }
//chen protected void btnMarker_Click(object sender, EventArgs e) { for (int i = 0; i <= gvTaskList.Rows.Count - 1; i++) { System.Web.UI.HtmlControls.HtmlInputCheckBox cbx = (System.Web.UI.HtmlControls.HtmlInputCheckBox)gvTaskList.Rows[i].FindControl("cbxContact"); if (cbx.Checked) { LinkButton l_btnMarker = (LinkButton)gvTaskList.Rows[i].FindControl("lbnQuickMarker"); String l_strProcessTemplate = l_btnMarker.CommandName; String l_strTableName = TableName.GetCirculateTableName(l_strProcessTemplate); B_Circulate l_burCirculate = new B_Circulate(l_strTableName); l_burCirculate.ID = Convert.ToInt32(l_btnMarker.CommandArgument); l_burCirculate.Is_Read = true; try { l_burCirculate.MultiRead(l_strTableName, l_burCirculate.ID); } catch (Exception err) { } } } LoadTaskList(); ClientScriptM.RefreshLeft(Page); }
public void LoadComment() { if (Request.QueryString["ID"] != null) { B_Circulate l_objCirculate = new B_Circulate(TableName.GetCirculateTableName(UCProcessType)); l_objCirculate.ID = SysConvert.ToInt32(Request.QueryString["ID"].ToString()); txtCommentView.Text = l_objCirculate.Comment; } }
protected void btnGoOnCirculate_Click(object sender, EventArgs e) { if (Request.QueryString["IsRead"] != "True") { String cyTB = TableName.GetCirculateTableName(base.TemplateName); B_Circulate l_burCirculate = new B_Circulate(cyTB); l_burCirculate.ID = SysConvert.ToInt32(Request.QueryString[ConstString.QueryString.CIRCULATE_ID]); l_burCirculate.Comment = this.ucGoOnCirculate.UCComment; l_burCirculate.Is_Read = true; Boolean l_blnIsSuccess = l_burCirculate.Save(); if (!l_blnIsSuccess) { JScript.Alert(SysString.GetErrMsgs(l_burCirculate.ErrMsgs)); return; } } DoCirculate(); }
/// <summary> /// 快速阅知 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbnQuickMarker_Click(object sender, EventArgs e) { LinkButton l_lbnQuickMarker = sender as LinkButton; String l_strProcessTemplate = l_lbnQuickMarker.CommandName; String l_strTableName = TableName.GetCirculateTableName(l_strProcessTemplate); B_Circulate l_burCirculate = new B_Circulate(l_strTableName); l_burCirculate.ID = Convert.ToInt32(l_lbnQuickMarker.CommandArgument); l_burCirculate.Is_Read = true; bool ret = l_burCirculate.Save(); if (ret) { LoadTaskList(); ClientScriptM.RefreshLeft(Page); } }
/// <summary> /// 分发 对与已经分发过的则不再分发 /// </summary> /// <param name="yiFenFaUser">已分发人员</param> /// <returns></returns> public void DoCirculate(ref string sSuccesName, ref string sFailedName) { if (!string.IsNullOrEmpty(this.txtCirculatesIDs.Value) || !string.IsNullOrEmpty(this.txtCirculatesDeptIDs.Value)) { string id = Request["CirculateID"] != null ? Request["CirculateID"].ToString() : "-1"; string sql = string.Format(@"SELECT * FROM {0} WHERE ID={1}", TableName.GetCirculateTableName(UCProcessType), id); DataTable dt = Entity.RunQuery(sql); B_ToCirculate tocir = new B_ToCirculate(); tocir.ToProcessID = this.UCProcessID; tocir.ToWorkItemID = this.UCWorkItemID; tocir.YiJian = FormsMethod.GetPrompt(this.txtCommentView.Text, this.txtCommentEdit.Text); tocir.IsAgain = false; tocir.ToProcessType = this.UCProcessType; tocir.ToUserIDS = this.txtCirculatesIDs.Value; tocir.ToiLevelCode = dt != null && dt.Rows.Count > 0 ? dt.Rows[0]["ID"].ToString() : "0"; tocir.ToiLastLevel = dt != null && dt.Rows.Count > 0 ? dt.Rows[0]["LevelCode"].ToString() : ""; if (!string.IsNullOrEmpty(this.txtCirculatesDeptIDs.Value)) { string strUserids = OAUser.GetUserByDeptPostArray(this.txtCirculatesDeptIDs.Value, OUConstString.PostName.FUKEZHANG, true, true)[0]; if (string.IsNullOrEmpty(strUserids) == false && strUserids.Length > 0) { strUserids = strUserids.Replace(";", ","); } if (!string.IsNullOrEmpty(this.txtCirculatesIDs.Value)) { tocir.ToUserIDS += "," + strUserids; } else { tocir.ToUserIDS += strUserids; } } string info = tocir.ChuanYueToDB(); sSuccesName = info; } }