protected void EGV_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row != null && e.Row.RowType == DataControlRowType.DataRow) { DataRowView rv = (DataRowView)e.Row.DataItem; if (oaBll.IsApproving(Convert.ToInt32(rv["ID"]))) { e.Row.FindControl("del").Visible = false; e.Row.FindControl("edit").Visible = false; } } }
protected void Page_Load(object sender, EventArgs e) { if (function.isAjax()) { string Action = Request.Form["Action"]; string result = ""; if (Action == "Print") { string content = Request.Form["Content"]; string img = Request.Form["Image"]; Session["PrintCon"] = content; Session["PrintImg"] = img; result = "1"; } else { string value = Request.Form["value"]; mmis = bmis.SelReturnModel(Convert.ToInt32(value)); result = oaCom.GetHolder(mmis, buser.GetLogin().GroupID.ToString()); } Response.Clear(); Response.Write(result); Response.Flush(); Response.End(); } if (!IsPostBack) { // if (!purBll.Auth("OADocumentWrite", buser.GetLogin().UserRole)) { function.WriteErrMsg("你当前没有起草公文的权限,请联系管理员!!!"); } TypeDataBind(); DPDataBind(); #region 签章初始化 DataTable signDT = signBll.SelByUserID(buser.GetLogin().UserID); if (signDT != null && signDT.Rows.Count > 0) { SignRadioBind(signDT); } else { signTrRemind.Visible = true; } #endregion if (Request.QueryString["Edit"] == "1" && !string.IsNullOrEmpty(Request.QueryString["AppID"])) { saveBtn.Text = "修改"; AddNewBtn.Visible = true; int id = DataConvert.CLng(Request.QueryString["AppID"]); M_MisProLevel freeMod = freeBll.SelByDocID(id); moa = boa.SelReturnModel(id); minfo = buser.SeachByID(moa.UserID); Title_T.Text = moa.Title; key = moa.Keywords; Keywords.Text = moa.Keywords; Secret.SelectedValue = moa.Secret.ToString(); Urgency.SelectedValue = moa.Urgency.ToString(); Importance.SelectedValue = moa.Importance.ToString(); DocType_DP.SelectedValue = moa.Type.ToString(); proDP.SelectedValue = moa.ProID.ToString(); Content.Text = moa.Content; CreateTime.Text = moa.CreateTime.ToString("yyyy/MM/dd HH:mm:ss"); Label1.Text = minfo.HoneyName; Label2.Text = groupBll.GetByID(minfo.GroupID).GroupName; if (freeMod != null) { RUserID_Hid.Value = freeMod.ReferUser; RUserName_Lab.Text = buser.GetUserNameByIDS(freeMod.ReferUser); CUserID_Hid.Value = freeMod.CCUser; CUserName_Lab.Text = buser.GetUserNameByIDS(freeMod.CCUser); } //附件相关,移除,不做检测 //proMod = proBll.SelReturnModel(moa.ProID); //if (proMod.AllowAttach == 1) //{ upFileTR.Visible = true; //} if (!string.IsNullOrEmpty(moa.PublicAttach)) { hasFileData.Value = moa.PublicAttach; string[] af = moa.PublicAttach.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); string h = ""; for (int i = 0; i < af.Length; i++) { h += "<span class='disupFile'>"; h += GroupPic.GetShowExtension(GroupPic.GetExtName(af[i])); h += "<a target='_blank' href=" + af[i] + ">" + af[i].Split('/')[(af[i].Split('/').Length - 1)] + "</a><a href='javascript:;' title='删除' onclick='delHasFile(\"" + af[i] + "\",this);' ><img src='/App_Themes/AdminDefaultTheme/images/del.png'/></a></span>"; } hasFileTD.InnerHtml = h; } //签章,用于修改 if (!string.IsNullOrEmpty(moa.SignID) && signRadio.Items.Count > 0) { signRadio.SelectedValue = moa.SignID.Split(':')[0]; Page.ClientScript.RegisterStartupScript(this.GetType(), "signInit", "InitPos('" + moa.SignID + "');", true); } DraftBtn.Visible = false; //-----检测是否已开始流程 if (boa.IsApproving(id))//已开始,不允许修改 { saveBtn.Visible = false; DraftBtn.Visible = false; clearBtn.Attributes.Add("disabled", "disabled"); clearBtn.Text = "流程已开始,禁止修改"; } } else { AddNewBtn.Visible = false; Label1.Text = buser.GetLogin().HoneyName; Label2.Text = groupBll.GetByID(buser.GetLogin().GroupID).GroupName; CreateTime.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"); } } }