コード例 #1
0
ファイル: InvProCreate.aspx.cs プロジェクト: weiliji/NFMT
        protected void Page_Load(object sender, EventArgs e)
        {
            string redirectUrl = "InvoiceProvisionalList.aspx";

            if (!IsPostBack)
            {
                Utility.VerificationUtility ver = new Utility.VerificationUtility();
                ver.JudgeOperate(this.Page, 61, new List<NFMT.Common.OperateEnum>() { NFMT.Common.OperateEnum.录入 });

                NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
                NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

                //获取合约与子合约
                int subId = 0;
                if (string.IsNullOrEmpty(Request.QueryString["id"]) || !int.TryParse(Request.QueryString["id"], out subId))
                    Response.Redirect(redirectUrl);

                NFMT.Contract.BLL.ContractSubBLL subBLL = new NFMT.Contract.BLL.ContractSubBLL();
                result = subBLL.Get(user, subId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                NFMT.Contract.Model.ContractSub sub = result.ReturnValue as NFMT.Contract.Model.ContractSub;
                if (sub == null || sub.SubId <= 0)
                    Response.Redirect(redirectUrl);

                this.curContractSub = sub;

                NFMT.Data.Model.Currency currency = NFMT.Data.BasicDataProvider.Currencies.FirstOrDefault(temp => temp.CurrencyId == sub.SettleCurrency);
                if (currency != null && currency.CurrencyId > 0)
                    this.currencyName = currency.CurrencyName;

                NFMT.Contract.BLL.ContractBLL conBLL = new NFMT.Contract.BLL.ContractBLL();
                result = conBLL.Get(user, sub.ContractId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                NFMT.Contract.Model.Contract contract = result.ReturnValue as NFMT.Contract.Model.Contract;
                if (contract == null || contract.ContractId <= 0)
                    Response.Redirect(redirectUrl);

                this.curContract = contract;

                if (contract.TradeDirection == (int)NFMT.Contract.TradeDirectionEnum.Buy)
                {
                    outSelf = 0;
                    inSelf = 1;
                    invoiceDirection = NFMT.Invoice.InvoiceDirectionEnum.收取;
                }

                this.SelectJson(sub.SubId, invoiceDirection);

                this.navigation1.Routes.Add("临票列表", redirectUrl);
                this.navigation1.Routes.Add(string.Format("临票新增", invoiceDirection), string.Empty);

                this.contractExpander1.CurContract = contract;
                this.contractExpander1.CurContractSub = sub;
                this.contractExpander1.RedirectUrl = redirectUrl;
            }
        }
コード例 #2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            if (string.IsNullOrEmpty(context.Request.Form["source"]))
            {
                result.Message = "数据源为空";
                result.ResultStatus = -1;
                context.Response.Write(serializer.Serialize(result));
                context.Response.End();
            }

            try
            {
                string jsonData = context.Request.Form["source"];
                var obj = serializer.Deserialize<NFMT.WorkFlow.Model.DataSource>(jsonData);

                NFMT.WareHouse.BLL.CustomsClearanceBLL bll = new NFMT.WareHouse.BLL.CustomsClearanceBLL();
                result = bll.Audit(user, obj, Convert.ToBoolean(context.Request.Form["ispass"]));
            }
            catch (Exception ex)
            {
                result.Message = ex.Message;
                result.ResultStatus = -1;
            }

            context.Response.Write(serializer.Serialize(result));
            context.Response.End();
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string redirectUrl = "FinanceInvoiceInvApplyList.aspx";

                Utility.VerificationUtility ver = new Utility.VerificationUtility();
                ver.JudgeOperate(this.Page, 117, new List<NFMT.Common.OperateEnum>() { NFMT.Common.OperateEnum.录入 });

                this.navigation1.Routes.Add("财务发票列表", "FinanceInvoiceList.aspx");
                this.navigation1.Routes.Add("开票申请列表", redirectUrl);
                this.navigation1.Routes.Add("财务发票新增", string.Empty);
                NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
                NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

                invoiceApplyId = 0;
                if (string.IsNullOrEmpty(Request.QueryString["id"]) || !int.TryParse(Request.QueryString["id"], out invoiceApplyId))
                    Response.Redirect(redirectUrl);

                //获取发票申请
                NFMT.Invoice.BLL.InvoiceApplyBLL invoiceApplyBLL = new NFMT.Invoice.BLL.InvoiceApplyBLL();
                result = invoiceApplyBLL.GetBIidsByInvApplyId(user, invoiceApplyId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                this.hidsids.Value = result.ReturnValue.ToString();

                string dirStr = "开出";
                //title init
                this.titInvDate.InnerHtml = string.Format("{0}日期:", dirStr);
            }
        }
コード例 #4
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
        }
コード例 #5
0
ファイル: SubmitAudit.aspx.cs プロジェクト: weiliji/NFMT
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string redirectUrl = "#";
                int mid =0;
                if (string.IsNullOrEmpty(Request.QueryString["mid"]) || !int.TryParse(Request.QueryString["mid"], out mid) || mid <= 0)
                    Response.Redirect(redirectUrl);

                NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
                NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

                //获取模板
                NFMT.WorkFlow.BLL.FlowMasterBLL fowMasterBLL = new NFMT.WorkFlow.BLL.FlowMasterBLL();
                result = fowMasterBLL.Get(user, mid);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                NFMT.WorkFlow.Model.FlowMaster flowMaster = result.ReturnValue as NFMT.WorkFlow.Model.FlowMaster;

                //模板标题
                if (flowMaster != null)
                    this.curTitle = flowMaster.ViewTitle;
                //模板内容
            }
        }
コード例 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Utility.VerificationUtility ver = new Utility.VerificationUtility();
                ver.JudgeOperate(this.Page, 117, new List<NFMT.Common.OperateEnum>() { NFMT.Common.OperateEnum.修改 });

                this.navigation1.Routes.Add("财务发票列表", "FinanceInvoiceList.aspx");
                this.navigation1.Routes.Add("财务发票修改", string.Empty);
                NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
                NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

                int fundsInvoiceId = 0;
                if (string.IsNullOrEmpty(Request.QueryString["id"]) || !int.TryParse(Request.QueryString["id"], out fundsInvoiceId))
                    Response.Redirect("FinanceInvoiceList.aspx");

                //获取财务发票
                NFMT.Invoice.BLL.FinanceInvoiceBLL financeInvoiceBLL = new NFMT.Invoice.BLL.FinanceInvoiceBLL();
                result = financeInvoiceBLL.Get(user, fundsInvoiceId);
                if (result.ResultStatus != 0)
                    Response.Redirect("FinanceInvoiceList.aspx");
                NFMT.Invoice.Model.FinanceInvoice fundsInvoice = result.ReturnValue as NFMT.Invoice.Model.FinanceInvoice;
                if (fundsInvoice == null || fundsInvoice.FinanceInvoiceId <= 0)
                    Response.Redirect("FinanceInvoiceList.aspx");

                this.curFundsInvoice = fundsInvoice;

                //获取主发票信息
                NFMT.Operate.BLL.InvoiceBLL invoiceBLL = new NFMT.Operate.BLL.InvoiceBLL();
                result = invoiceBLL.Get(user, fundsInvoice.InvoiceId);
                if (result.ResultStatus != 0)
                    Response.Redirect("FinanceInvoiceList.aspx");
                NFMT.Operate.Model.Invoice invoice = result.ReturnValue as NFMT.Operate.Model.Invoice;
                if (invoice == null || invoice.InvoiceId <= 0)
                    Response.Redirect("FinanceInvoiceList.aspx");

                this.curInvoice = invoice;

                NFMT.Invoice.BLL.FinBusInvAllotDetailBLL finBusInvAllotDetailBLL = new NFMT.Invoice.BLL.FinBusInvAllotDetailBLL();
                result = finBusInvAllotDetailBLL.GetBIds(user, fundsInvoice.FinanceInvoiceId);
                if (result.ResultStatus != 0)
                    Response.Redirect("FinanceInvoiceList.aspx");

                this.hidsids.Value = result.ReturnValue.ToString();

                string dirStr = "开出";
                if (invoice.InvoiceDirection == 34)
                {
                    dirStr = "收入";
                    outSelf = 0;
                    inSelf = 1;
                }
                invoiceDirection = invoice.InvoiceDirection;
                //title init
                this.titInvDate.InnerHtml = string.Format("{0}日期:", dirStr);

                //attach
                this.attach1.BusinessIdValue = this.curInvoice.InvoiceId;
            }
        }
コード例 #7
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            int stockInId = 0;
            if (!string.IsNullOrEmpty(context.Request.Form["id"]))
            {
                if (!int.TryParse(context.Request.Form["id"], out stockInId))
                {
                    result.Message = "参数错误";
                    context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                    context.Response.End();
                }
            }

            NFMT.WareHouse.Model.StockIn stockIn = new NFMT.WareHouse.Model.StockIn()
            {
                StockInId = stockInId
            };

            NFMT.WareHouse.BLL.StockInBLL bll = new NFMT.WareHouse.BLL.StockInBLL();
            result = bll.Invalid(user, stockIn);
            if (result.ResultStatus == 0)
                result.Message = "作废成功";

            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            string redirectUrl = "CashInAllotList.aspx";
            System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();

            if (!IsPostBack)
            {
                Utility.VerificationUtility ver = new Utility.VerificationUtility();
                ver.JudgeOperate(this.Page, 56, new List<NFMT.Common.OperateEnum>() { NFMT.Common.OperateEnum.录入 });

                this.navigation1.Routes.Add("公司收款分配", redirectUrl);
                this.navigation1.Routes.Add("公司收款分配新增", string.Empty);

                int corpId = 0;
                if (string.IsNullOrEmpty(Request.QueryString["id"]) || !int.TryParse(Request.QueryString["id"], out corpId) || corpId <= 0)
                    Response.Redirect(redirectUrl);

                NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

                //公司信息
                NFMT.User.Model.Corporation corp = NFMT.User.UserProvider.Corporations.FirstOrDefault(temp => temp.CorpId == corpId);
                if (corp == null || corp.CorpId <= 0)
                    Response.Redirect(redirectUrl);

                this.curCorp = corp;

                this.curSelectedStr = "{}";
            }
        }
コード例 #9
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            int taskNodeId = 0;
            if (string.IsNullOrEmpty(context.Request.Form["id"]) || !int.TryParse(context.Request.Form["id"], out taskNodeId) || taskNodeId <= 0)
            {
                result.Message = "序号错误";
                context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                context.Response.End();
            }

            string memo = context.Request.Form["memo"];
            string logResult = context.Request.Form["logResult"];

            NFMT.WorkFlow.BLL.TaskNodeBLL bll = new NFMT.WorkFlow.BLL.TaskNodeBLL();
            result = bll.ReturnHandle(user, new NFMT.WorkFlow.Model.TaskOperateLog()
            {
                TaskNodeId = taskNodeId,
                EmpId = user.EmpId,
                Memo = memo,
                LogTime = DateTime.Now,
                LogResult = logResult
            });

            if (result.ResultStatus == 0)
                result.Message = "操作成功";

            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
            context.Response.End();
        }
コード例 #10
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
                NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

                int menuId = 0;
                if (!string.IsNullOrEmpty(context.Request.QueryString["menuId"]))
                    int.TryParse(context.Request.QueryString["menuId"], out menuId);

                int empId = 0;
                if (!string.IsNullOrEmpty(context.Request.QueryString["empId"]))
                    int.TryParse(context.Request.QueryString["empId"], out empId);

                NFMT.User.BLL.MenuBLL bll = new NFMT.User.BLL.MenuBLL();
                result = bll.GetOperateList(user, menuId, empId);

                context.Response.ContentType = "application/json; charset=utf-8";
                if (result.ResultStatus != 0)
                {
                    context.Response.Write(result.Message);
                    context.Response.End();
                }

                context.Response.Write(result.ReturnValue);
            }
            catch (Exception e)
            {
                context.Response.Write(e.Message);
            }
        }
コード例 #11
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            int stockMoveApplyId = 0;
            if (!string.IsNullOrEmpty(context.Request.Form["id"]))
            {
                if (!int.TryParse(context.Request.Form["id"], out stockMoveApplyId))
                {
                    result.Message = "参数错误";
                    context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                    context.Response.End();
                }
            }

            NFMT.WareHouse.BLL.StockMoveApplyBLL bll = new NFMT.WareHouse.BLL.StockMoveApplyBLL();
            result = bll.Get(user, stockMoveApplyId);
            if (result.ResultStatus != 0)
            {
                result.Message = "获取数据错误";
                context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                context.Response.End();
            }

            NFMT.WareHouse.Model.StockMoveApply stockMoveApply = result.ReturnValue as NFMT.WareHouse.Model.StockMoveApply;
            result = bll.Complete(user, stockMoveApply);
            if (result.ResultStatus == 0)
                result.Message = "完成成功";

            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
        }
コード例 #12
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            string oldPwd = context.Request.Form["o"];
            if (string.IsNullOrEmpty(oldPwd))
            {
                result.Message = "原密码不能为空";
                context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                context.Response.End();
            }

            string newPwd = context.Request.Form["n"];
            if (string.IsNullOrEmpty(newPwd))
            {
                result.Message = "新密码不能为空";
                context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                context.Response.End();
            }

            NFMT.User.BLL.AccountBLL bll = new NFMT.User.BLL.AccountBLL();
            result = bll.ChangePwd(user, oldPwd, newPwd);
            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
        }
コード例 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Utility.VerificationUtility ver = new Utility.VerificationUtility();
                ver.JudgeOperate(this.Page, 66, new List<NFMT.Common.OperateEnum>() { NFMT.Common.OperateEnum.录入 });

                string direction = Request.QueryString["d"];
                if (string.IsNullOrEmpty(direction))
                    Response.Redirect("InvoiceFundsList.aspx");

                string dirStr = "开出";
                if (direction.ToLower() == "in")
                {
                    dirStr = "收入";
                    outSelf = 0;
                    inSelf = 1;
                    invoiceDirection = 34;
                }

                this.navigation1.Routes.Add("财务发票列表", "InvoiceFundsList.aspx");
                this.navigation1.Routes.Add(string.Format("财务发票{0}",dirStr), string.Empty);
                NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
                NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

                //title init
                this.titInvDate.InnerHtml = string.Format("{0}日期:",dirStr);

            }
        }
コード例 #14
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            string priceConfirmStr = context.Request.Form["priceConfirm"];
            if (string.IsNullOrEmpty(priceConfirmStr))
            {
                result.Message = "价格确认单信息不能为空";
                context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                context.Response.End();
            }

            string rowsStr = context.Request.Form["rows"];
            if (string.IsNullOrEmpty(rowsStr))
            {
                result.Message = "价格确认单明细信息不能为空";
                context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                context.Response.End();
            }

            bool isSubmitAudit = false;
            if (string.IsNullOrEmpty(context.Request.Form["IsSubmitAudit"]) || !bool.TryParse(context.Request.Form["IsSubmitAudit"], out isSubmitAudit))
                isSubmitAudit = false;

            try
            {
                System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
                NFMT.DoPrice.Model.PriceConfirm priceConfirm = serializer.Deserialize<NFMT.DoPrice.Model.PriceConfirm>(priceConfirmStr);
                List<NFMT.DoPrice.Model.PriceConfirmDetail> details = serializer.Deserialize<List<NFMT.DoPrice.Model.PriceConfirmDetail>>(rowsStr);
                if (priceConfirm == null || details == null || !details.Any())
                {
                    result.Message = "数据错误";
                    context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                    context.Response.End();
                }

                foreach (NFMT.DoPrice.Model.PriceConfirmDetail detail in details)
                {
                    detail.SettlePrice = priceConfirm.SettlePrice;
                    detail.SettleBala = detail.SettlePrice * detail.ConfirmAmount;
                }

                NFMT.DoPrice.BLL.PriceConfirmBLL bll = new NFMT.DoPrice.BLL.PriceConfirmBLL();
                result = bll.Create(user, priceConfirm, details, isSubmitAudit);
                if (result.ResultStatus == 0)
                {
                    result.Message = "价格确认单新增成功";
                }
            }
            catch (Exception ex)
            {
                result.ResultStatus = -1;
                result.Message = ex.Message;
            }

            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
            context.Response.End();
        }
コード例 #15
0
        public void ProcessRequest(HttpContext context)
        {
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();
            context.Response.ContentType = "text/plain";
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;

            string orderStr = context.Request.Form["order"];
            string orderStockInvoiceStr = context.Request.Form["orderStockInvoice"];
            string orderDetailStr = context.Request.Form["orderDetail"];
            string isSubmitAuditStr = context.Request.Form["IsSubmitAudit"];

            System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();

            NFMT.Document.Model.DocumentOrder order = serializer.Deserialize<NFMT.Document.Model.DocumentOrder>(orderStr);
            List<NFMT.Document.Model.OrderStockInvoice> stockInvoices = serializer.Deserialize<List<NFMT.Document.Model.OrderStockInvoice>>(orderStockInvoiceStr);
            NFMT.Document.Model.DocumentOrderDetail detail = serializer.Deserialize<NFMT.Document.Model.DocumentOrderDetail>(orderDetailStr);

            bool isSubmitAudit = false;
            if (string.IsNullOrEmpty(isSubmitAuditStr) || !bool.TryParse(isSubmitAuditStr, out isSubmitAudit))
                isSubmitAudit = false;

            NFMT.Document.BLL.DocumentOrderBLL bll = new NFMT.Document.BLL.DocumentOrderBLL();
            result = bll.Create(user, order, stockInvoices, detail, isSubmitAudit);

            if (result.ResultStatus == 0)
                result.Message = "制单指令新增成功";

            string jsonStr = Newtonsoft.Json.JsonConvert.SerializeObject(result);
            context.Response.Write(jsonStr);
        }
コード例 #16
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            int attachId = 0;
            if (string.IsNullOrEmpty(context.Request.Form["aid"]) || !int.TryParse(context.Request.Form["aid"], out attachId) || attachId <= 0)
            {
                context.Response.Write("附件序号错误");
                context.Response.End();
            }

            int status = 0;
            if (string.IsNullOrEmpty(context.Request.Form["s"]) || !int.TryParse(context.Request.Form["s"], out status) || status <= 0)
            {
                context.Response.Write("状态信息错误");
                context.Response.End();
            }

            try
            {
                NFMT.Operate.BLL.AttachBLL bll = new NFMT.Operate.BLL.AttachBLL();
                result = bll.UpdateAttachStatus(user, attachId, status);
            }
            catch (Exception ex)
            {
                result.ResultStatus = -1;
                result.Message = ex.Message;
            }

            context.Response.Write(result.Message);
        }
コード例 #17
0
        public void ProcessRequest(HttpContext context)
        {
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();
            context.Response.ContentType = "text/plain";
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;

            string documentStr = context.Request.Form["document"];
            string docStocksStr = context.Request.Form["docStocks"];
            string isSubmitAuditStr = context.Request.Form["IsSubmitAudit"];

            System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();

            NFMT.Document.Model.Document document = serializer.Deserialize<NFMT.Document.Model.Document>(documentStr);
            List<NFMT.Document.Model.DocumentStock> docStocks = serializer.Deserialize<List<NFMT.Document.Model.DocumentStock>>(docStocksStr);

            bool isSubmitAudit = false;
            if (string.IsNullOrEmpty(isSubmitAuditStr) || !bool.TryParse(isSubmitAuditStr, out isSubmitAudit))
                isSubmitAudit = false;

            NFMT.Document.BLL.DocumentBLL bll = new NFMT.Document.BLL.DocumentBLL();
            result = bll.Create(user, document, docStocks, isSubmitAudit);

            if (result.ResultStatus == 0)
                result.Message = "制单新增成功";

            string jsonStr = Newtonsoft.Json.JsonConvert.SerializeObject(result);
            context.Response.Write(jsonStr);
        }
コード例 #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string redirectStr = string.Format("{0}BasicData/DeliverPlaceList.aspx", NFMT.Common.DefaultValue.NftmSiteName);
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            if (!IsPostBack)
            {
                Utility.VerificationUtility ver = new Utility.VerificationUtility();
                ver.JudgeOperate(this.Page, 97, new List<NFMT.Common.OperateEnum>() { NFMT.Common.OperateEnum.修改 });

                this.navigation1.Routes.Add("交货地管理", redirectStr);
                this.navigation1.Routes.Add("交货地修改", string.Empty);

                this.hidBDStyleId.Value = ((int)NFMT.Data.StyleEnum.交货地类型).ToString();

                int dPId = 0;
                if (string.IsNullOrEmpty(Request.QueryString["id"]) || !int.TryParse(Request.QueryString["id"], out dPId) || dPId <= 0)
                    Response.Redirect(redirectStr);

                NFMT.Data.BLL.DeliverPlaceBLL deliverPlaceBLL = new NFMT.Data.BLL.DeliverPlaceBLL();
                result = deliverPlaceBLL.Get(user, dPId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectStr);

                deliverPlace = result.ReturnValue as NFMT.Data.Model.DeliverPlace;
                if (deliverPlace == null)
                    Response.Redirect(redirectStr);
            }
        }
コード例 #19
0
        public void ProcessRequest(HttpContext context)
        {
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            int roleId = 0;
            if (!string.IsNullOrEmpty(context.Request.Form["roleId"]))
                int.TryParse(context.Request.Form["roleId"], out roleId);

            try
            {
                NFMT.User.BLL.EmpRoleBLL empRoleBLL = new NFMT.User.BLL.EmpRoleBLL();
                result = empRoleBLL.GetEmpIdsByRoleId(user, roleId);
                if (result.ResultStatus != 0)
                {
                    context.Response.Write(result.Message);
                    context.Response.End();
                }
            }
            catch (Exception ex)
            {
                result.Message = ex.Message;
                result.ResultStatus = -1;
            }

            context.Response.ContentType = "text/plain";
            context.Response.Write(result.ReturnValue);
        }
コード例 #20
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            string paymentyStr = context.Request.Form["Payment"];
            if (string.IsNullOrEmpty(paymentyStr))
            {
                result.Message = "财务付款不能为空";
                context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                context.Response.End();
            }

            try
            {
                System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
                NFMT.Funds.Model.Payment payment = serializer.Deserialize<NFMT.Funds.Model.Payment>(paymentyStr);

                NFMT.Funds.BLL.PaymentBLL bll = new NFMT.Funds.BLL.PaymentBLL();
                result = bll.PaymentContractCreate(user, payment);

                if (result.ResultStatus == 0)
                {
                    result.Message = "付款添加成功";
                }
            }
            catch (Exception ex)
            {
                result.ResultStatus = -1;
                result.Message = ex.Message;
            }

            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
        }
コード例 #21
0
ファイル: AuthGroupDetail.aspx.cs プロジェクト: weiliji/NFMT
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Utility.VerificationUtility ver = new Utility.VerificationUtility();
                ver.JudgeOperate(this.Page, 99, new List<NFMT.Common.OperateEnum>() { NFMT.Common.OperateEnum.冻结, NFMT.Common.OperateEnum.解除冻结 });

                string redirectUrl = string.Format("{0}User/AuthGroupList.aspx", NFMT.Common.DefaultValue.NftmSiteName);
                NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
                NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

                this.navigation1.Routes.Add("权限组管理", redirectUrl);
                this.navigation1.Routes.Add("权限组明细", string.Empty);

                this.hidContractInOut.Value = ((int)NFMT.Data.StyleEnum.ContractSide).ToString();
                this.hidContractLimit.Value = ((int)NFMT.Data.StyleEnum.ContractLimit).ToString();
                this.hidTradeBorder.Value = ((int)NFMT.Data.StyleEnum.TradeBorder).ToString();
                this.hidTradeDirection.Value = ((int)NFMT.Data.StyleEnum.TradeDirection).ToString();

                int authGroupId = 0;
                if (string.IsNullOrEmpty(Request.QueryString["id"]) || !int.TryParse(Request.QueryString["id"], out authGroupId) || authGroupId <= 0)
                    Response.Redirect(redirectUrl);

                NFMT.User.BLL.AuthGroupBLL authGroupBLL = new NFMT.User.BLL.AuthGroupBLL();
                result = authGroupBLL.Get(user, authGroupId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                authGroup = result.ReturnValue as NFMT.User.Model.AuthGroup;
                if (authGroup == null)
                    Response.Redirect(redirectUrl);
            }
        }
コード例 #22
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();
            string resultStr = "撤返失败";

            int repoId = 0;
            if (!string.IsNullOrEmpty(context.Request.Form["id"]))
            {
                if (!int.TryParse(context.Request.Form["id"], out repoId))
                {
                    context.Response.Write("参数错误");
                    context.Response.End();
                }
            }

            NFMT.WareHouse.BLL.RepoBLL bll = new NFMT.WareHouse.BLL.RepoBLL();
            result = bll.Get(user, repoId);
            if (result.ResultStatus != 0)
            {
                context.Response.Write("获取数据错误");
                context.Response.End();
            }

            NFMT.WareHouse.Model.Repo repo = result.ReturnValue as NFMT.WareHouse.Model.Repo;

            result = bll.GoBack(user, repo);
            resultStr = result.Message;

            context.Response.Write(resultStr);
        }
コード例 #23
0
ファイル: EmpCreateHandler.ashx.cs プロジェクト: weiliji/NFMT
        public void ProcessRequest(HttpContext context)
        {
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            try
            {
                NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
                context.Response.ContentType = "text/plain";

                string empStr = context.Request.Form["Employee"];
                if (string.IsNullOrEmpty(empStr))
                {
                    context.Response.Write("员工信息不能为空");
                    context.Response.End();
                }

                string accountStr = context.Request.Form["account"];
                if (string.IsNullOrEmpty(empStr))
                {
                    context.Response.Write("员工账号密码信息不能为空");
                    context.Response.End();
                }

                System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
                NFMT.User.Model.Employee emp = serializer.Deserialize<NFMT.User.Model.Employee>(empStr);
                NFMT.User.Model.Account account = serializer.Deserialize<NFMT.User.Model.Account>(accountStr);

                if (emp.DeptId <= 0)
                {
                    context.Response.Write("未选择部门");
                    context.Response.End();
                }

                if (string.IsNullOrEmpty(emp.EmpCode))
                {
                    context.Response.Write("未填写员工编号");
                    context.Response.End();
                }

                if (string.IsNullOrEmpty(emp.Name))
                {
                    context.Response.Write("员工名称不能为空");
                    context.Response.End();
                }

                NFMT.User.BLL.EmployeeBLL empBLL = new NFMT.User.BLL.EmployeeBLL();
                result = empBLL.CreateHandler(user, emp, account);

                if (result.ResultStatus == 0)
                    result.Message = "员工新增成功";

            }
            catch (Exception e)
            {
                result.Message = e.Message;
                result.ResultStatus = -1;
            }

            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
        }
コード例 #24
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            int pledgeId = 0;
            if (!string.IsNullOrEmpty(context.Request.Form["id"]))
            {
                if (!int.TryParse(context.Request.Form["id"], out pledgeId))
                {
                    result.Message = "参数错误";
                    context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                    context.Response.End();
                }
            }

            NFMT.WareHouse.BLL.PledgeBLL bll = new NFMT.WareHouse.BLL.PledgeBLL();
            result = bll.Complete(user, pledgeId);
            if (result.ResultStatus == 0)
                result.Message = "成功完成";

            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
        }
コード例 #25
0
        public void ProcessRequest(HttpContext context)
        {
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();
            context.Response.ContentType = "text/plain";
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;

            string orderStr = context.Request.Form["order"];
            string orderStockInvoiceStr = context.Request.Form["orderStockInvoice"];
            string orderDetailStr = context.Request.Form["orderDetail"];

            System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();

            NFMT.Document.Model.DocumentOrder order = serializer.Deserialize<NFMT.Document.Model.DocumentOrder>(orderStr);
            List<NFMT.Document.Model.OrderReplaceStock> stockInvoices = serializer.Deserialize<List<NFMT.Document.Model.OrderReplaceStock>>(orderStockInvoiceStr);
            NFMT.Document.Model.DocumentOrderDetail detail = serializer.Deserialize<NFMT.Document.Model.DocumentOrderDetail>(orderDetailStr);

            NFMT.Document.BLL.DocumentOrderBLL bll = new NFMT.Document.BLL.DocumentOrderBLL();
            result = bll.UpdateReplaceOrder(user, order, stockInvoices, detail);

            if (result.ResultStatus == 0)
                result.Message = "制单指令修改成功";

            string jsonStr = Newtonsoft.Json.JsonConvert.SerializeObject(result);
            context.Response.Write(jsonStr);
        }
コード例 #26
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            string masterName = context.Request.Form["mn"];
            string masterEname = context.Request.Form["men"];

            if (string.IsNullOrEmpty(masterName))
            {
                result.Message = "合约模板名称不能为空";
                context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                context.Response.End();
            }

            if (string.IsNullOrEmpty(masterEname))
            {
                result.Message = "合约模板英文名称不能为空";
                context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                context.Response.End();
            }

            NFMT.Data.BLL.ContractMasterBLL bll = new NFMT.Data.BLL.ContractMasterBLL();
            NFMT.Data.Model.ContractMaster master = new NFMT.Data.Model.ContractMaster();
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            master.CreatorId = user.EmpId;
            master.MasterName = masterName;
            master.MasterEname = masterEname;
            master.MasterStatus = NFMT.Common.StatusEnum.已录入;

            result = bll.Insert(user, master);

            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
        }
コード例 #27
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            string redirectUrl = string.Format("{0}Default.aspx", NFMT.Common.DefaultValue.NfmtSiteName);
            string jsString = string.Format(" <script type=\"text/javascript\">window.parent.location.href=\"{0}Login.aspx?redirectUrl={1}\";</script>", NFMT.Common.DefaultValue.NfmtPassPort, redirectUrl);

            NFMT.Sms.BLL.SmsBLL bll = new NFMT.Sms.BLL.SmsBLL();
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            if (user == null || user.EmpId <= 0)
            {
                context.Response.Write(jsString);
                context.Response.Flush();
            }

            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();
            string postData = string.Empty;

            result = bll.GetCurrentSms(user);
            if (result.ResultStatus != 0)
            {
                postData = Newtonsoft.Json.JsonConvert.SerializeObject(new Sms() { SmsId = 0 });
                context.Response.Write(postData);
                context.Response.End();
            }
            System.Data.DataTable dt = result.ReturnValue as System.Data.DataTable;
            postData = Newtonsoft.Json.JsonConvert.SerializeObject(dt);
            context.Response.Write(postData);
        }
コード例 #28
0
ファイル: StockOutPrint.aspx.cs プロジェクト: weiliji/NFMT
        protected string GetDetailHTML(NFMT.Common.UserModel user, List<NFMT.WareHouse.Model.StockOutDetail> details)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            NFMT.WareHouse.Model.Stock stock = new NFMT.WareHouse.Model.Stock();
            NFMT.WareHouse.BLL.StockBLL stockBLL = new NFMT.WareHouse.BLL.StockBLL();
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            foreach (NFMT.WareHouse.Model.StockOutDetail detail in details)
            {
                result = stockBLL.Get(user, detail.StockId);
                if (result.ResultStatus != 0)
                    continue;

                stock = result.ReturnValue as NFMT.WareHouse.Model.Stock;
                if (stock == null)
                    continue;

                sb.Append("<tr class=\"txt\">");
                sb.AppendFormat("<td>{0}</td>", stock.CardNo);
                sb.AppendFormat("<td>{0}</td>", NFMT.Data.BasicDataProvider.Assets.SingleOrDefault(a => a.AssetId == stock.AssetId).AssetName);
                sb.AppendFormat("<td>{0}</td>", NFMT.Data.BasicDataProvider.Brands.SingleOrDefault(a => a.BrandId == stock.BrandId).BrandName);
                sb.AppendFormat("<td>{0}</td>", detail.GrossAmount);
                sb.Append("<td>&nbsp;</td>");
                sb.Append("<td>&nbsp;</td>");
                sb.Append("<td>&nbsp;</td>");
                sb.Append("</tr>");

                if (string.IsNullOrEmpty(this.DPName))
                    DPName = NFMT.Data.BasicDataProvider.DeliverPlaces.SingleOrDefault(a => a.DPId == stock.DeliverPlaceId).DPName;
            }

            return sb.ToString();
        }
コード例 #29
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            int stockMoveApplyId = 0;
            if (!string.IsNullOrEmpty(context.Request.Form["id"]))
            {
                if (!int.TryParse(context.Request.Form["id"], out stockMoveApplyId))
                {
                    result.Message = "参数错误";
                    context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
                    context.Response.End();
                }
            }

            string memo = context.Request.Form["memo"];

            NFMT.WareHouse.BLL.StockMoveBLL stockMoveBLL = new NFMT.WareHouse.BLL.StockMoveBLL();
            result = stockMoveBLL.StockMoveCreateHandle(user, stockMoveApplyId, memo);
            if (result.ResultStatus == 0)
                result.Message = "新增成功";

            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
        }
コード例 #30
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            string itemStr = context.Request.Form["item"];
            if (string.IsNullOrEmpty(itemStr))
            {
                context.Response.Write("修改信息不能为空");
                context.Response.End();
            }
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

            try
            {
                System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
                NFMT.Funds.Model.PaymentStockDetail detail = serializer.Deserialize<NFMT.Funds.Model.PaymentStockDetail>(itemStr);

                NFMT.Funds.BLL.PaymentStockDetailBLL bll = new NFMT.Funds.BLL.PaymentStockDetailBLL();
                result = bll.Update(user, detail);

                if (result.ResultStatus == 0)
                    result.Message = "修改成功";
            }
            catch (Exception ex)
            {
                result.ResultStatus = -1;
                result.Message = ex.Message;
            }

            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(result));
            context.Response.End();
        }