public void ProcessRequest(HttpContext context) { NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser; context.Response.ContentType = "text/plain"; string blocName = context.Request.Form["name"]; string blocEName = context.Request.Form["ename"]; string blocFName = context.Request.Form["fname"]; string resultStr = "添加失败"; if (string.IsNullOrEmpty(blocName)) { resultStr = "集团名称不能为空"; context.Response.Write(resultStr); context.Response.End(); } if (string.IsNullOrEmpty(blocEName)) { resultStr = "集团英文名称不能为空"; context.Response.Write(resultStr); context.Response.End(); } if (string.IsNullOrEmpty(blocFName)) { resultStr = "明细编号不能为空"; context.Response.Write(resultStr); context.Response.End(); } bool isSelf = true; NFMT.User.BLL.BlocBLL blocBLL = new NFMT.User.BLL.BlocBLL(); NFMT.Common.ResultModel result = blocBLL.IsExistSelfBolc(user); if (result.ResultStatus != 0) isSelf = false; NFMT.User.Model.Bloc bloc = new NFMT.User.Model.Bloc() { BlocName = blocName, BlocEname = blocEName, BlocFullName = blocFName, IsSelf = isSelf }; result = blocBLL.Insert(user, bloc); resultStr = result.Message; context.Response.Write(resultStr); }
public void ProcessRequest(HttpContext context) { NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser; context.Response.ContentType = "text/plain"; int id = 0; int operateId = 0; if (!int.TryParse(context.Request.Form["id"], out id) || id <= 0) { context.Response.Write("序号错误"); context.Response.End(); } if (!int.TryParse(context.Request.Form["oi"], out operateId) || operateId <= 0) { context.Response.Write("操作错误"); context.Response.End(); } NFMT.User.BLL.BlocBLL blocBLL = new NFMT.User.BLL.BlocBLL(); NFMT.User.Model.Bloc bloc = new NFMT.User.Model.Bloc() { LastModifyId = user.EmpId, BlocId = id }; NFMT.Common.OperateEnum operateEnum = (NFMT.Common.OperateEnum)operateId; NFMT.Common.ResultModel result = new NFMT.Common.ResultModel(); switch (operateEnum) { case NFMT.Common.OperateEnum.作废: result = blocBLL.Invalid(user, bloc); break; case NFMT.Common.OperateEnum.撤返: result = blocBLL.GoBack(user, bloc); break; case NFMT.Common.OperateEnum.冻结: result = blocBLL.Freeze(user, bloc); break; case NFMT.Common.OperateEnum.解除冻结: result = blocBLL.UnFreeze(user, bloc); break; } context.Response.Write(result.Message); }
public void ProcessRequest(HttpContext context) { NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser; int status = -1; int pageIndex = 1, pageSize = 10; string orderStr = string.Empty, whereStr = string.Empty; string key = context.Request["k"];//模糊搜索 if (!string.IsNullOrEmpty(context.Request["s"])) int.TryParse(context.Request["s"], out status);//状态查询条件 if (!string.IsNullOrEmpty(context.Request.QueryString["pagenum"])) int.TryParse(context.Request.QueryString["pagenum"], out pageIndex); pageIndex++; if (!string.IsNullOrEmpty(context.Request.QueryString["pagesize"])) int.TryParse(context.Request.QueryString["pagesize"], out pageSize); if (!string.IsNullOrEmpty(context.Request.QueryString["sortdatafield"]) && !string.IsNullOrEmpty(context.Request.QueryString["sortorder"])) orderStr = string.Format("{0} {1}", context.Request.QueryString["sortdatafield"].Trim(), context.Request.QueryString["sortorder"].Trim()); NFMT.User.BLL.BlocBLL blocBLL = new NFMT.User.BLL.BlocBLL(); NFMT.Common.SelectModel select = blocBLL.GetSelectModel(pageIndex, pageSize, orderStr, status, key); NFMT.Common.ResultModel result = blocBLL.Load(user, select); context.Response.ContentType = "application/json; charset=utf-8"; if (result.ResultStatus != 0) { context.Response.Write(result.Message); context.Response.End(); } System.Data.DataTable dt = result.ReturnValue as System.Data.DataTable; System.Collections.Generic.Dictionary<string, object> dic = new System.Collections.Generic.Dictionary<string, object>(); dic.Add("count", result.AffectCount); dic.Add("data", dt); string postData = Newtonsoft.Json.JsonConvert.SerializeObject(dic); context.Response.Write(postData); }
public void ProcessRequest(HttpContext context) { NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser; NFMT.User.BLL.BlocBLL blocBLL = new NFMT.User.BLL.BlocBLL(); var result = blocBLL.GetBlocList(user); context.Response.ContentType = "application/json; charset=utf-8"; if (result.ResultStatus != 0) { context.Response.Write(result.Message); context.Response.End(); } System.Data.DataTable dt = result.ReturnValue as System.Data.DataTable; string jsonStr = Newtonsoft.Json.JsonConvert.SerializeObject(dt); context.Response.Write(jsonStr); }
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); }
public void ProcessRequest(HttpContext context) { NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser; context.Response.ContentType = "text/plain"; string blocName = context.Request.Form["name"]; string blocEName = context.Request.Form["ename"]; string blocFName = context.Request.Form["fname"]; int id = 0; string resultStr = "修改失败"; if (string.IsNullOrEmpty(context.Request.Form["id"])) { resultStr = "id未知"; context.Response.Write(resultStr); context.Response.End(); } if (!int.TryParse(context.Request.Form["id"], out id)) { resultStr = "id未知"; context.Response.Write(resultStr); context.Response.End(); } if (string.IsNullOrEmpty(blocName)) { resultStr = "集团名称不能为空"; context.Response.Write(resultStr); context.Response.End(); } if (string.IsNullOrEmpty(blocEName)) { resultStr = "集团英文名称不能为空"; context.Response.Write(resultStr); context.Response.End(); } if (string.IsNullOrEmpty(blocFName)) { resultStr = "明细编号不能为空"; context.Response.Write(resultStr); context.Response.End(); } NFMT.User.BLL.BlocBLL blocBLL = new NFMT.User.BLL.BlocBLL(); NFMT.User.Model.Bloc bloc = new NFMT.User.Model.Bloc(); bloc.BlocId = id; bloc.BlocName = blocName; bloc.BlocEname = blocEName; bloc.BlocFullName = blocFName; var result = blocBLL.Update(user, bloc); resultStr = result.Message; context.Response.Write(resultStr); context.Response.End(); }