protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string redirectUrl = string.Format("{0}User/CorporationList.aspx", NFMT.Common.DefaultValue.NftmSiteName);
                NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
                NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

                Utility.VerificationUtility ver = new Utility.VerificationUtility();
                ver.JudgeOperate(this.Page, 16, new List<NFMT.Common.OperateEnum>() { NFMT.Common.OperateEnum.冻结, NFMT.Common.OperateEnum.解除冻结 });

                this.navigation1.Routes.Add("企业管理", redirectUrl);
                this.navigation1.Routes.Add("客户明细", string.Empty);

                NFMT.User.BLL.CorporationDetailBLL corporationDetailBLL = new NFMT.User.BLL.CorporationDetailBLL();
                //int detailId = 0;
                int corpId = 0;
                //if (!string.IsNullOrEmpty(Request.QueryString["detailId"]) && int.TryParse(Request.QueryString["detailId"], out detailId))
                //{
                //    result = corporationDetailBLL.Get(user, detailId);
                //    NFMT.User.Model.CorporationDetail corporationDetail = result.ReturnValue as NFMT.User.Model.CorporationDetail;
                //    if (corporationDetail == null)
                //        Response.Redirect(redirectUrl);
                //    corpId = corporationDetail.CorpId;
                //}

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

                NFMT.User.BLL.CorporationBLL corporationBLL = new NFMT.User.BLL.CorporationBLL();
                result = corporationBLL.Get(user, corpId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                corporation = result.ReturnValue as NFMT.User.Model.Corporation;
                if (corporation == null)
                    Response.Redirect(redirectUrl);

                result = corporationDetailBLL.GetByCorpId(user, corpId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                corpDetail = result.ReturnValue as NFMT.User.Model.CorporationDetail;
                if (corpDetail == null)
                    Response.Redirect(redirectUrl);

                System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
                string json = serializer.Serialize(corporation);
                this.hidModel.Value = json;
            }
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Utility.VerificationUtility ver = new Utility.VerificationUtility();
                ver.JudgeOperate(this.Page, 80, new List<NFMT.Common.OperateEnum>() { NFMT.Common.OperateEnum.录入 });

                this.navigation1.Routes.Add("员工部门分配-部门列表", string.Format("{0}User/DeptList.aspx", NFMT.Common.DefaultValue.NftmSiteName));
                this.navigation1.Routes.Add("员工分配", string.Empty);

                int deptId = 0;
                if (string.IsNullOrEmpty(Request.QueryString["deptId"]))
                    Response.Redirect("DeptList.aspx");

                if(!int.TryParse(Request.QueryString["deptId"],out deptId))
                    Response.Redirect("DeptList.aspx");

                NFMT.User.BLL.DepartmentBLL bll = new NFMT.User.BLL.DepartmentBLL();
                NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
                NFMT.Common.ResultModel result = bll.Get(user,deptId);
                if(result.ResultStatus!=0)
                    Response.Redirect("DeptList.aspx");
                NFMT.User.Model.Department dept = result.ReturnValue as NFMT.User.Model.Department;

                if(dept == null || dept.DeptId ==0)
                    Response.Redirect("DeptList.aspx");

                NFMT.User.BLL.CorporationBLL corpBll = new NFMT.User.BLL.CorporationBLL();
                result = corpBll.Get(user, dept.CorpId);
                if(result.ResultStatus !=0)
                    Response.Redirect("DeptList.aspx");
                NFMT.User.Model.Corporation corp = result.ReturnValue as NFMT.User.Model.Corporation;
                if (corp == null || corp.CorpId == 0 || !corp.IsSelf)
                    Response.Redirect("DeptList.aspx");

                //设置部门信息
                this.spnDeptCode.InnerHtml = dept.DeptCode;
                this.spnDeptName.InnerHtml = dept.DeptName;
                this.spnCorpName.InnerHtml = corp.CorpName;

                NFMT.Data.StyleEnum style = NFMT.Data.StyleEnum.部门类型;
                NFMT.Data.Model.BDStyleDetail detail = NFMT.Data.DetailProvider.Details(style)[dept.DeptType];
                this.spnDeptType.InnerHtml = detail.DetailName;

                this.hidDeptId.Value = dept.DeptId.ToString();

            }
        }
Exemple #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
            string directUrl = string.Format("{0}User/CorporationList.aspx", NFMT.Common.DefaultValue.NftmSiteName);

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

                this.navigation1.Routes.Add("企业管理", directUrl);
                this.navigation1.Routes.Add("企业修改", string.Empty);

                this.hidStyleId.Value = ((int)NFMT.Data.StyleEnum.公司类型).ToString();

                if (string.IsNullOrEmpty(Request.QueryString["id"]))
                    Response.Redirect(directUrl);

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

                this.hidId.Value = id.ToString();

                NFMT.User.BLL.CorporationBLL corpBLL = new NFMT.User.BLL.CorporationBLL();
                var result = corpBLL.Get(user, id);
                if (result.ResultStatus != 0)
                    Response.Redirect(directUrl);

                NFMT.User.Model.Corporation corp = result.ReturnValue as NFMT.User.Model.Corporation;
                if (corp != null)
                {
                    this.hidBlocId.Value = corp.ParentId.ToString();
                    this.txbCorpCode.Value = corp.CorpCode;
                    this.txbCorpName.Value = corp.CorpName;
                    this.txbCorpEName.Value = corp.CorpEName;
                    this.txbTaxPlayer.Value = corp.TaxPayerId.ToString();
                    this.txbCorpFName.Value = corp.CorpFullName;
                    this.txbCorpFEName.Value = corp.CorpFullEName;
                    this.txbCorpAddress.Value = corp.CorpAddress;
                    this.txbCorpEAddress.Value = corp.CorpEAddress;
                    this.txbCorpTel.Value = corp.CorpTel;
                    this.txbCorpFax.Value = corp.CorpFax;
                    this.txbCorpZip.Value = corp.CorpZip;
                    this.hidCorpType.Value = corp.CorpType.ToString();
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            string redirectUrl = string.Format("{0}Funds/ReceivableCorpReadyCorpList.aspx", NFMT.Common.DefaultValue.NftmSiteName);
            NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;

            if (!IsPostBack)
            {
                this.navigation1.Routes.Add("公司收款分配", string.Format("{0}Funds/ReceivableCorpList.aspx", NFMT.Common.DefaultValue.NftmSiteName));
                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);

                this.hidCorpId.Value = corpId.ToString();

                NFMT.User.BLL.CorporationBLL corporationBLL = new NFMT.User.BLL.CorporationBLL();
                result = corporationBLL.Get(user, corpId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                NFMT.User.Model.Corporation corp = result.ReturnValue as NFMT.User.Model.Corporation;
                if (corp != null)
                {
                    this.hidBlocId.Value = corp.ParentId.ToString();

                    NFMT.User.Model.Bloc bloc = NFMT.User.UserProvider.Blocs.SingleOrDefault(a => a.BlocId == corp.ParentId);
                    if (bloc != null)
                        this.spanBlocId.InnerText = bloc.BlocName;

                    this.spanCorpCode.InnerText = corp.CorpCode;
                    this.spanCorpName.InnerText = corp.CorpName;
                    this.spanTaxPlayer.InnerText = corp.TaxPayerId;
                    this.spanCorpAddress.InnerText = corp.CorpAddress;
                    this.spanCorpTel.InnerText = corp.CorpTel;
                    this.spanCorpFax.InnerText = corp.CorpFax;
                    this.spanCorpZip.InnerText = corp.CorpZip;
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string redirectUrl = string.Format("{0}User/CorporationList.aspx", NFMT.Common.DefaultValue.NftmSiteName);
                NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;
                NFMT.Common.ResultModel result = new NFMT.Common.ResultModel();

                Utility.VerificationUtility ver = new Utility.VerificationUtility();
                ver.JudgeOperate(this.Page, 16, 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))
                    Response.Redirect(redirectUrl);

                NFMT.User.BLL.CorporationBLL corporationBLL = new NFMT.User.BLL.CorporationBLL();
                result = corporationBLL.Get(user, corpId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                corporation = result.ReturnValue as NFMT.User.Model.Corporation;
                if (corporation == null)
                    Response.Redirect(redirectUrl);

                NFMT.User.BLL.CorporationDetailBLL corporationDetailBLL = new NFMT.User.BLL.CorporationDetailBLL();
                result = corporationDetailBLL.GetByCorpId(user, corpId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                corpDetail = result.ReturnValue as NFMT.User.Model.CorporationDetail;
                if (corpDetail == null)
                    Response.Redirect(redirectUrl);
            }
        }