protected void Page_Load(object sender, EventArgs e) { NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser; if (!IsPostBack) { Utility.VerificationUtility ver = new Utility.VerificationUtility(); ver.JudgeOperate(this.Page, 15, new List<NFMT.Common.OperateEnum>() { NFMT.Common.OperateEnum.冻结, NFMT.Common.OperateEnum.解除冻结 }); this.navigation1.Routes.Add("集团管理", string.Format("{0}User/BlocList.aspx", NFMT.Common.DefaultValue.NftmSiteName)); this.navigation1.Routes.Add("集团明细", string.Empty); if (!string.IsNullOrEmpty(Request.QueryString["id"])) { if (int.TryParse(Request.QueryString["id"], out id)) { if (id == 0) Response.Redirect("BlocList.aspx"); NFMT.User.BLL.BlocBLL blocBLL = new NFMT.User.BLL.BlocBLL(); var result = blocBLL.Get(user, id); if (result.ResultStatus != 0) Response.Redirect("BlocList.aspx"); NFMT.User.Model.Bloc bloc = result.ReturnValue as NFMT.User.Model.Bloc; if (bloc != null) { this.txbblocEName.InnerHtml = bloc.BlocEname; this.txbblocFullName.InnerHtml = bloc.BlocFullName; this.txbBlocName.InnerHtml = bloc.BlocName; this.hidId.Value = bloc.BlocId.ToString(); } System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); string json = serializer.Serialize(bloc); this.hidModel.Value = json; } } } }
protected void Page_Load(object sender, EventArgs e) { NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser; string directURL = string.Format("{0}User/BlocList.aspx", NFMT.Common.DefaultValue.NftmSiteName); if (!IsPostBack) { Utility.VerificationUtility ver = new Utility.VerificationUtility(); ver.JudgeOperate(this.Page, 15, new List<NFMT.Common.OperateEnum>() { NFMT.Common.OperateEnum.修改 }); this.navigation1.Routes.Add("集团管理", directURL); this.navigation1.Routes.Add("集团修改", string.Empty); if (string.IsNullOrEmpty(Request.QueryString["id"])) Response.Redirect(directURL); int id = 0; if (!int.TryParse(Request.QueryString["id"], out id) || id == 0) Response.Redirect(directURL); this.hidId.Value = id.ToString(); NFMT.User.BLL.BlocBLL blocBLL = new NFMT.User.BLL.BlocBLL(); var result = blocBLL.Get(user, id); if (result.ResultStatus != 0) Response.Redirect(directURL); NFMT.User.Model.Bloc bloc = result.ReturnValue as NFMT.User.Model.Bloc; if (bloc != null) { this.txbblocEName.Value = bloc.BlocEname; this.txbblocFullName.Value = bloc.BlocFullName; this.txbBlocName.Value = bloc.BlocName; //this.hidtext.Value = bloc.IsSelf ? "true" : "false"; } } }
public void ProcessRequest(HttpContext context) { NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser; context.Response.ContentType = "text/plain"; int masterId = 0; if (string.IsNullOrEmpty(context.Request.Form["masterId"]) || !int.TryParse(context.Request.Form["masterId"], out masterId) || masterId <= 0) { context.Response.Write("流程模版序号错误"); context.Response.End(); } int id = 0; if (string.IsNullOrEmpty(context.Request.Form["id"]) || !int.TryParse(context.Request.Form["id"], out id) || id <= 0) { context.Response.Write("序号错误"); context.Response.End(); } NFMT.User.BLL.BlocBLL blocBLL = new NFMT.User.BLL.BlocBLL(); NFMT.Common.ResultModel result = blocBLL.Get(user, id); if (result.ResultStatus != 0) { context.Response.Write(result.Message); context.Response.End(); } NFMT.User.Model.Bloc bloc = result.ReturnValue as NFMT.User.Model.Bloc; NFMT.WorkFlow.BLL.FlowMasterBLL flowMasterBLL = new NFMT.WorkFlow.BLL.FlowMasterBLL(); result = flowMasterBLL.Get(user, masterId); if (result.ResultStatus != 0) { context.Response.Write(result.Message); context.Response.End(); } NFMT.WorkFlow.Model.FlowMaster flowMaster = result.ReturnValue as NFMT.WorkFlow.Model.FlowMaster; NFMT.WorkFlow.Model.DataSource source = new NFMT.WorkFlow.Model.DataSource() { //DataBaseName = "NFMT_User", TableName = "dbo.Bloc", DataStatus = NFMT.Common.StatusEnum.待审核, RowId = id,//BlocId ViewUrl = flowMaster.ViewUrl, EmpId = user.EmpId, ApplyTime = DateTime.Now, ApplyTitle = string.Empty, ApplyMemo = string.Empty, ApplyInfo = string.Empty, RefusalUrl = flowMaster.RefusalUrl, SuccessUrl = flowMaster.SuccessUrl, DalName = string.IsNullOrEmpty(bloc.DalName) ? "NFMT.User.DAL.BlocDAL" : bloc.DalName, AssName = string.IsNullOrEmpty(bloc.AssName) ? "NFMT.User" : bloc.AssName }; NFMT.WorkFlow.Model.Task task = new NFMT.WorkFlow.Model.Task() { MasterId = masterId, TaskName = string.Format("{0} 审核", bloc.BlocName) }; result = blocBLL.Submit(user, new NFMT.User.Model.Bloc() { Id = id }); if (result.ResultStatus != 0) { context.Response.Write(result.Message); context.Response.End(); } //NFMT.WorkFlow.FlowOperate flowOperate = new NFMT.WorkFlow.FlowOperate(); //result = flowOperate.CreateTask(user, flowMaster, source, task); //if (result.ResultStatus == 0) //{ // context.Response.Write("提交审核成功"); //} //else //{ // context.Response.Write(result.Message); //} }
public void ProcessRequest(HttpContext context) { NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser; context.Response.ContentType = "text/plain"; int blocId = 0; string taxPlayer = context.Request.Form["taxPlayer"]; string corpCode = context.Request.Form["corpCode"]; string corpName = context.Request.Form["corpName"]; string corpEName = context.Request.Form["corpEName"]; string corpFName = context.Request.Form["corpFName"]; string corpFEName = context.Request.Form["corpFEName"]; string corpAddress = context.Request.Form["corpAddress"]; string corpEAddress = context.Request.Form["corpEAddress"]; string corpTel = context.Request.Form["corpTel"]; string corpFax = context.Request.Form["corpFax"]; string corpZip = context.Request.Form["corpZip"]; int corpType = 0; string resultStr = "添加失败"; if (string.IsNullOrEmpty(corpCode)) { resultStr = "企业代码不能为空"; context.Response.Write(resultStr); context.Response.End(); } if (string.IsNullOrEmpty(corpName)) { resultStr = "企业名称不能为空"; context.Response.Write(resultStr); context.Response.End(); } if (!string.IsNullOrEmpty(context.Request.Form["blocId"])) { if (!int.TryParse(context.Request.Form["blocId"], out blocId)) { resultStr = "所属集团转换错误"; context.Response.Write(resultStr); context.Response.End(); } } if (string.IsNullOrEmpty(context.Request.Form["taxPlayer"])) { resultStr = "纳税人识别号不能为空"; context.Response.Write(resultStr); context.Response.End(); } if (!string.IsNullOrEmpty(context.Request.Form["corpType"])) { if (!int.TryParse(context.Request.Form["corpType"], out corpType)) { resultStr = "企业类型转换错误"; context.Response.Write(resultStr); context.Response.End(); } } NFMT.Common.ResultModel result = null; NFMT.User.Model.Bloc bloc = null; NFMT.User.BLL.BlocBLL blocBLL = new NFMT.User.BLL.BlocBLL(); if (blocId != 0) { result = blocBLL.Get(user, blocId); if (result.ResultStatus != 0) { resultStr = "获取集团错误"; context.Response.Write(resultStr); context.Response.End(); } bloc = result.ReturnValue as NFMT.User.Model.Bloc; } NFMT.User.Model.Corporation corp = new NFMT.User.Model.Corporation() { ParentId = blocId, CorpCode = corpCode, CorpName = corpName, CorpEName = corpEName, TaxPayerId = taxPlayer, CorpFullName = corpFName, CorpFullEName = corpFEName, CorpAddress = corpAddress, CorpEAddress = corpEAddress, CorpTel = corpTel, CorpFax = corpFax, CorpZip = corpZip, CorpType = corpType, IsSelf = bloc != null ? bloc.IsSelf : false }; NFMT.User.BLL.CorporationBLL corpBLL = new NFMT.User.BLL.CorporationBLL(); result = corpBLL.Insert(user, corp); resultStr = result.Message; context.Response.Write(resultStr); }