예제 #1
0
        /// <summary>
        /// 取消热门省
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnCancelHot_Click(object sender, EventArgs e)
        {
            string hidValue = this.hidOne.Value.TrimEnd(',');

            if (hidValue.Length == 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('请选择要取消热门的信息!');", true);
                return;
            }
            string[] arr = hidValue.Split(',');
            if (arr.Length > 1)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('只能选择一项信息进行设置!');", true);
                return;
            }
            int num = AreaInfoService.SetHot(Convert.ToInt32(arr[0]), 0);

            if (num > 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('设置成功!');", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('设置失败!');", true);
            }
            GetOneInfo();
            //加载热门信息
            LoadHotInfo();
        }
예제 #2
0
        /// <summary>
        /// 修改一级信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnModOne_Click(object sender, EventArgs e)
        {
            string name  = this.txtOne.Text.Trim();
            string pChar = txtChar.Text.Trim();

            if (name.Length == 0 || pChar.Length == 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('名称和字符信息不能为空!');", true);
                return;
            }
            string hidValue = this.hidOne.Value.TrimEnd(',');

            if (hidValue.Length == 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('请选择要修改的信息!');", true);
                return;
            }
            string[] arr = hidValue.Split(',');
            if (arr.Length > 1)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('只能选择一项信息进行修改!');", true);
                return;
            }
            AreaInfoService.Update(Convert.ToInt32(arr[0]), name, pChar);

            ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('修改成功!');location.href='areaInfo.aspx'", true);
        }
예제 #3
0
        protected void btnModRegion_Click(object sender, EventArgs e)
        {
            string name = this.txtRegion.Text.Trim();
            string cCh  = txtC.Text.Trim();

            if (name.Length == 0 || cCh.Length == 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('商圈名称和字符信息不能为空!');", true);
                return;
            }
            string hidValue = this.hidRegion.Value.TrimEnd(',');

            if (hidValue.Length == 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('请选择要修改的信息!');", true);
                return;
            }
            string[] arr = hidValue.Split(',');
            if (arr.Length > 1)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('只能选择一项信息进行修改!');", true);
                return;
            }
            AreaInfoService.Update(Convert.ToInt32(arr[0]), name, cCh);

            ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('修改成功!');", true);
            this.GetRegion(this.ddlCity.SelectedValue);
        }
예제 #4
0
        /// <summary>
        /// 删除一级信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnDelOne_Click(object sender, EventArgs e)
        {
            string hidValue = this.hidOne.Value.TrimEnd(',');

            if (hidValue.Length == 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('请选择要删除的信息!');", true);
                return;
            }
            string[] arr = hidValue.Split(',');
            if (arr.Length > 1)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('只能选择一项信息进行删除!');", true);
                return;
            }
            int num = AreaInfoService.Delete(Convert.ToInt32(arr[0]));

            if (num > 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('删除成功!');", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('删除失败!');", true);
            }
            GetOneInfo();
        }
예제 #5
0
        /// <summary>
        /// 加载一级信息
        /// </summary>
        private void LoadOneInfo()
        {
            DataSet ds = AreaInfoService.GetList("parentId = 0");

            if (ds.Tables[0].Rows.Count > 0)
            {
                ddlOne.Items.Clear();
                ddlOne.DataSource     = ds;
                ddlOne.DataTextField  = "areaName";
                ddlOne.DataValueField = "id";
                ddlOne.DataBind();
                //this.ddlProvince.SelectedValue = "1";

                ddlProvince.Items.Clear();
                ddlProvince.DataSource     = ds;
                ddlProvince.DataTextField  = "areaName";
                ddlProvince.DataValueField = "id";
                ddlProvince.DataBind();
            }
            ddlOne.Items.Insert(0, new ListItem("请选择省级分类", "0"));
            ddlProvince.Items.Insert(0, new ListItem("请选择省级分类", "0"));

            //加载热门信息
            LoadHotInfo();
        }
예제 #6
0
        /// <summary>
        /// 添加一级信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnAddOne_Click(object sender, EventArgs e)
        {
            string pName = this.txtOne.Text.Trim();
            string pChar = this.txtChar.Text.Trim();

            if (pName.Length == 0 || pChar.Length == 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('名称和字符信息不能为空!');", true);
                return;
            }
            AreaInfo item = new AreaInfo();

            item.areaName  = pName;
            item.charIndex = pChar;
            item.parentId  = 0;
            item.status    = 0;
            item.remark    = "";
            int num = AreaInfoService.Add(item);

            if (num > 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('添加成功!');", true);
            }

            LoadOneInfo();
        }
예제 #7
0
        /// <summary>
        /// 获取地址信息
        /// </summary>
        /// <returns></returns>
        protected string GetAddr(object pid)
        {
            UserAddress ua = UserAddressService.GetModel(Convert.ToInt32(pid));

            if (ua != null)
            {
                return(AreaInfoService.GetName(Convert.ToInt32(ua.qq)) + " " + AreaInfoService.GetName(Convert.ToInt32(ua.weixin)) + " " + AreaInfoService.GetName(Convert.ToInt32(ua.zipcode)) + " " + ua.address + " " + ua.addressDetail);
            }
            return("");
        }
예제 #8
0
        /// <summary>
        /// 绑定信息
        /// </summary>
        private void BindData()
        {
            DataSet ds = AreaInfoService.GetList("parentId = 0");

            if (ds.Tables[0].Rows.Count > 0)
            {
                location_p.DataSource     = ds;
                location_p.DataTextField  = "areaName";
                location_p.DataValueField = "id";
                location_p.DataBind();
            }
            location_p.Items.Insert(0, new ListItem("请选择", "0"));
            location_c.Items.Insert(0, new ListItem("请选择", "0"));
            location_a.Items.Insert(0, new ListItem("请选择", "0"));
            UserAddress item = UserAddressService.GetModel(id);

            if (item != null)
            {
                ViewState["labelname"]   = item.addressDetail;
                ViewState["address"]     = item.address;
                ViewState["telephone"]   = item.tel;
                ViewState["mobile"]      = item.mobile;
                ViewState["name"]        = item.relName;
                location_p.SelectedValue = item.qq;

                location_c.Items.Clear();
                ds = AreaInfoService.GetList("parentId = " + location_p.SelectedValue);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    location_c.DataSource     = ds;
                    location_c.DataTextField  = "areaName";
                    location_c.DataValueField = "id";
                    location_c.DataBind();
                }
                location_c.Items.Insert(0, new ListItem("请选择", "0"));
                location_c.SelectedValue = item.weixin;

                location_a.Items.Clear();
                ds = AreaInfoService.GetList("parentId = " + location_c.SelectedValue);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    location_a.DataSource     = ds;
                    location_a.DataTextField  = "areaName";
                    location_a.DataValueField = "id";
                    location_a.DataBind();
                }
                location_a.Items.Insert(0, new ListItem("请选择", "0"));
                location_a.SelectedValue = item.zipcode;
            }
        }
예제 #9
0
        private void LoadHotInfo()
        {
            StringBuilder sb = new StringBuilder();
            DataSet       ds = AreaInfoService.GetList("status = " + 1);

            if (ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    sb.Append("<label class=\"preview\"> " + dr["areaName"] + "</label>");
                }
            }
            ViewState["hotInfo"] = sb.ToString();
        }
예제 #10
0
        /// <summary>
        /// 一级信息加载
        /// </summary>
        /// <returns></returns>
        protected string GetOneInfo()
        {
            StringBuilder sb = new StringBuilder();
            DataSet       ds = AreaInfoService.GetList("parentId = 0");

            if (ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    sb.Append("<label class=\"preview\"><input type=\"radio\" id='one" + dr["id"] + "' name='one' onclick=\"getOneInfo(" + dr["id"] + ",'" + dr["areaName"] + "','" + dr["charIndex"] + "',this);\" />" + dr["areaName"] + "</label>");
                }
            }
            return(sb.ToString());
        }
예제 #11
0
        protected void location_c_SelectedIndexChanged(object sender, EventArgs e)
        {
            location_a.Items.Clear();
            DataSet ds = AreaInfoService.GetList("parentId = " + location_c.SelectedValue);

            if (ds.Tables[0].Rows.Count > 0)
            {
                location_a.DataSource     = ds;
                location_a.DataTextField  = "areaName";
                location_a.DataValueField = "id";
                location_a.DataBind();
            }
            location_a.Items.Insert(0, new ListItem("请选择", "0"));
        }
예제 #12
0
        /// <summary>
        /// 市信息加载
        /// </summary>
        /// <returns></returns>
        private void GetTwo(string pid)
        {
            StringBuilder sb = new StringBuilder();

            if (pid != "0")
            {
                DataSet ds = AreaInfoService.GetList("parentId = " + pid);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow dr in ds.Tables[0].Rows)
                    {
                        sb.Append("<label class=\"preview\"><input type=\"radio\" id='city" + dr["id"] + "' name='city' onclick=\"getCityInfo(" + dr["id"] + ",'" + dr["areaName"] + "','" + dr["charIndex"] + "',this);\" />" + dr["areaName"] + "</label>");
                    }
                }
            }
            ViewState["twoInfo"] = sb.ToString();
        }
예제 #13
0
        /// <summary>
        /// 省级分类下拉事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ddlProvince_SelectedIndexChanged(object sender, EventArgs e)
        {
            string pid = ddlProvince.SelectedValue;

            if (pid != "0")
            {
                ddlCity.Items.Clear();
                DataSet ds = AreaInfoService.GetList("parentId = " + pid);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    ddlCity.DataSource     = ds;
                    ddlCity.DataTextField  = "areaName";
                    ddlCity.DataValueField = "id";
                    ddlCity.DataBind();
                }
                ddlCity.Items.Insert(0, new ListItem("请选择", "0"));
            }
        }
예제 #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //NormalUser =(UserInfo)Session["userInfo"];     //实际项目中从session中获取
            NormalUser         = new UserInfo();
            NormalUser.AreaNum = int.Parse(Request.Cookies["userInfo"]["AreaNum"]);
            returnMessage      = string.Empty;
            AreaInfoService areaService = new AreaInfoService();

            //为Area属性赋值(根据当前用户的AreaNum属性)
            Area = areaService.SelectAreaInfo(NormalUser.AreaNum, out returnMessage);
            if (File.Exists(Request.MapPath("/AssessmentReport/" + DateTime.Now.Year.ToString() + "_Area_" + NormalUser.AreaNum + ".txt")) || File.Exists(Request.MapPath("/AssessmentReport/" + DateTime.Now.Year.ToString() + "_Area_" + NormalUser.AreaNum + ".pdf")) || File.Exists(Request.MapPath("/AssessmentReport/" + DateTime.Now.Year.ToString() + "_Area_" + NormalUser.AreaNum + ".doc")) || File.Exists(Request.MapPath("/AssessmentReport/" + DateTime.Now.Year.ToString() + "_Area_" + NormalUser.AreaNum + ".docx")))
            {
                fileExist = "评估报告已上传成功!";
            }
            else
            {
                fileExist = "评估报告未上传!";
            }
        }
예제 #15
0
        protected void btnRegion_Click(object sender, EventArgs e)
        {
            string pid = this.ddlProvince.SelectedValue;
            string cid = ddlCity.SelectedValue;

            if (pid == "0" || cid == "0")
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('请选择省市分类!');", true);
                return;
            }
            string regionName = this.txtRegion.Text.Trim();
            string cCh        = this.txtC.Text.Trim();

            if (regionName.Length == 0 || cCh.Length == 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('商圈名称和字符信息不能为空!');", true);
                return;
            }
            AreaInfo item = new AreaInfo();

            item.areaName  = regionName;
            item.charIndex = cCh;
            item.parentId  = Convert.ToInt32(cid);
            item.status    = 0;
            item.remark    = "";
            int num = AreaInfoService.Add(item);

            if (num > 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('添加成功!');", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('添加失败!');", true);
            }
            this.GetRegion(cid);
        }
예제 #16
0
        /// <summary>
        /// 添加市信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnAddTwo_Click(object sender, EventArgs e)
        {
            string pid = this.ddlOne.SelectedValue;

            if (pid == "0")
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('请选择省级分类!');", true);
                return;
            }
            string twoName = this.txtTwo.Text.Trim();
            string cCh     = txtCharCity.Text.Trim();

            if (twoName.Length == 0 || cCh.Length == 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('市名称和字符信息不能为空!');", true);
                return;
            }
            AreaInfo item = new AreaInfo();

            item.areaName  = twoName;
            item.charIndex = cCh;
            item.parentId  = Convert.ToInt32(pid);
            item.status    = 0;
            item.remark    = "";
            int num = AreaInfoService.Add(item);

            if (num > 0)
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('添加成功!');", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('添加失败!');", true);
            }
            GetTwo(pid);
        }
        //public IEnumerable<ChannelAccProfile> GetAllChannelAccProfile()
        //{
        //    try
        //    {
        //        var _ListChannelAccProfile = _IUoW.mTakaDbQuery().GetAllChannelAccProfile_LQ();
        //        return _ListChannelAccProfile;
        //    }
        //    catch (Exception ex)
        //    {
        //        _ObjErrorLogService = new ErrorLogService();
        //        _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllChannelAccProfile()", string.Empty);
        //        return null;
        //    }
        //}
        public List <ChannelAccProfile> GetAllChannelAccProfile()
        {
            try
            {
                List <ChannelAccProfile> OBJ_LIST_ChannelAccProfile = new List <ChannelAccProfile>();
                var _ListChannelAccProfile = _IUoW.Repository <ChannelAccProfile>().Get(x => x.AuthStatusId == "A" && x.LastAction != "DEL").OrderByDescending(x => x.AccountProfileId);
                foreach (var item in _ListChannelAccProfile)
                {
                    ChannelAccProfile         OBJ_ChannelAccProfile         = new ChannelAccProfile();
                    ChannelAccProfileService  OBJ_ChannelAccProfileService  = new ChannelAccProfileService();
                    AccCategoryService        OBJ_AccCategoryService        = new AccCategoryService();
                    AccTypeService            OBJ_AccTypeService            = new AccTypeService();
                    CustomerAccProfileService OBJ_CustomerAccProfileService = new CustomerAccProfileService();
                    CountryInfoService        OBJ_CountryInfoService        = new CountryInfoService();
                    CityInfoService           OBJ_CityInfoService           = new CityInfoService();
                    DistrictInfoService       OBJ_DistrictInfoService       = new DistrictInfoService();
                    PSInfoService             OBJ_PSInfoService             = new PSInfoService();
                    AreaInfoService           OBJ_AreaInfoService           = new AreaInfoService();
                    BankInfoService           OBJ_BankInfoService           = new BankInfoService();
                    BranchInfoService         OBJ_BranchInfoService         = new BranchInfoService();
                    AccStatusSetupService     OBJ_AccStatusSetupService     = new AccStatusSetupService();
                    ManagerTypeService        OBJ_ManagerTypeService        = new ManagerTypeService();
                    ManagerAccProfileService  OBJ_ManagerProfileService     = new ManagerAccProfileService();

                    OBJ_ChannelAccProfile.AccountProfileId = item.AccountProfileId;
                    ////OBJ_ChannelAccProfile.AccountCategoryId = item.AccountCategoryId;
                    ////foreach (var item1 in OBJ_AccCategoryService.GetAccCategoryForDD())
                    ////{
                    ////    if (item1.Value == OBJ_ChannelAccProfile.AccountCategoryId)
                    ////    {
                    ////        OBJ_ChannelAccProfile.AccountCategoryNm = item1.Text;
                    ////    }
                    ////}
                    OBJ_ChannelAccProfile.AccountTypeId = item.AccountTypeId;
                    foreach (var item1 in OBJ_AccTypeService.GetAccTypeForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.AccountTypeId)
                        {
                            OBJ_ChannelAccProfile.AccountTypeNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.WalletAccountNo = item.WalletAccountNo;
                    OBJ_ChannelAccProfile.UserName        = item.UserName;
                    OBJ_ChannelAccProfile.FatherNm        = item.FatherNm;
                    OBJ_ChannelAccProfile.MotherNm        = item.MotherNm;
                    OBJ_ChannelAccProfile.DateofBirth     = item.DateofBirth;
                    OBJ_ChannelAccProfile.NationalityId   = item.NationalityId;
                    OBJ_ChannelAccProfile.Gender          = item.Gender;
                    foreach (var item1 in OBJ_CustomerAccProfileService.GetGender())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.Gender)
                        {
                            OBJ_ChannelAccProfile.GenderNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.TAXIdNo          = item.TAXIdNo;
                    OBJ_ChannelAccProfile.PassportNo       = item.PassportNo;
                    OBJ_ChannelAccProfile.PresentAddress1  = item.PresentAddress1;
                    OBJ_ChannelAccProfile.PresentAddress2  = item.PresentAddress2;
                    OBJ_ChannelAccProfile.PresentCountryId = item.PresentCountryId;
                    foreach (var item1 in OBJ_CountryInfoService.GetCountryInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PresentCountryId)
                        {
                            OBJ_ChannelAccProfile.PresentCountryNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PresentCityId = item.PresentCityId;
                    foreach (var item1 in OBJ_CityInfoService.GetCityInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PresentCityId)
                        {
                            OBJ_ChannelAccProfile.PresentCityNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PresentDistrictId = item.PresentDistrictId;
                    foreach (var item1 in OBJ_DistrictInfoService.GetDistrictInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PresentDistrictId)
                        {
                            OBJ_ChannelAccProfile.PresentDistrictNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PresentPoliceStationId = item.PresentPoliceStationId;
                    foreach (var item1 in OBJ_PSInfoService.GetPSInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PresentPoliceStationId)
                        {
                            OBJ_ChannelAccProfile.PresentPoliceStationNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PresentAreaId = item.PresentAreaId;
                    foreach (var item1 in OBJ_AreaInfoService.GetAreaInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PresentAreaId)
                        {
                            OBJ_ChannelAccProfile.PresentAreaNm = item1.Text;
                        }
                    }
                    //OBJ_ChannelAccProfile.PresentPhoneNo = item.PresentPhoneNo;
                    OBJ_ChannelAccProfile.PermanentAddress1  = item.PermanentAddress1;
                    OBJ_ChannelAccProfile.PermanentAddress2  = item.PermanentAddress2;
                    OBJ_ChannelAccProfile.PermanentCountryId = item.PermanentCountryId;
                    foreach (var item1 in OBJ_CountryInfoService.GetCountryInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PermanentCountryId)
                        {
                            OBJ_ChannelAccProfile.PermanentCountryNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PermanentCityId = item.PermanentCityId;
                    foreach (var item1 in OBJ_CityInfoService.GetCityInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PermanentCityId)
                        {
                            OBJ_ChannelAccProfile.PermanentCityNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PermanentDistrictId = item.PermanentDistrictId;
                    foreach (var item1 in OBJ_DistrictInfoService.GetDistrictInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PermanentDistrictId)
                        {
                            OBJ_ChannelAccProfile.PermanentDistrictNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PermanentPoliceStationId = item.PermanentPoliceStationId;
                    foreach (var item1 in OBJ_PSInfoService.GetPSInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PermanentPoliceStationId)
                        {
                            OBJ_ChannelAccProfile.PermanentPoliceStationNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PermanentAreaId = item.PermanentAreaId;
                    foreach (var item1 in OBJ_AreaInfoService.GetAreaInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PermanentAreaId)
                        {
                            OBJ_ChannelAccProfile.PermanentAreaNm = item1.Text;
                        }
                    }
                    //OBJ_ChannelAccProfile.PermanentPhoneNo = item.PermanentPhoneNo;
                    OBJ_ChannelAccProfile.BankId = item.BankId;
                    foreach (var item1 in OBJ_BankInfoService.GetBankInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.BankId)
                        {
                            OBJ_ChannelAccProfile.BankNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.BranchId = item.BranchId;
                    foreach (var item1 in OBJ_BranchInfoService.GetBranchInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.BranchId)
                        {
                            OBJ_ChannelAccProfile.BranchNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.BankAccountNo       = item.BankAccountNo;
                    OBJ_ChannelAccProfile.ParentAccountTypeId = item.ParentAccountTypeId;
                    foreach (var item1 in OBJ_AccTypeService.GetAccTypeForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.ParentAccountTypeId)
                        {
                            OBJ_ChannelAccProfile.ParentAccountTypeNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.ParentAccountProfileId = item.ParentAccountProfileId;
                    foreach (var item1 in OBJ_ChannelAccProfileService.GetChannelAccProfileForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.ParentAccountProfileId)
                        {
                            OBJ_ChannelAccProfile.ParentChannelAccProfileNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.CompanyNm         = item.CompanyNm;
                    OBJ_ChannelAccProfile.Occupation        = item.Occupation;
                    OBJ_ChannelAccProfile.NationalIdNo      = item.NationalIdNo;
                    OBJ_ChannelAccProfile.VatRegistrationNo = item.VatRegistrationNo;
                    OBJ_ChannelAccProfile.AccountStatusId   = item.AccountStatusId;
                    foreach (var item1 in OBJ_AccStatusSetupService.GetAccStatusSetupForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.AccountStatusId)
                        {
                            OBJ_ChannelAccProfile.AccountStatusName = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.TradeLicenseNo = item.TradeLicenseNo;
                    ////OBJ_ChannelAccProfile.ManagerTypeId = item.ManagerTypeId;
                    ////foreach (var item1 in OBJ_ManagerTypeService.GetManagerTypeForDD())
                    ////{
                    ////    if (item1.Value == OBJ_ChannelAccProfile.ManagerTypeId)
                    ////    {
                    ////        OBJ_ChannelAccProfile.ManagerTypeNm = item1.Text;
                    ////    }
                    ////}
                    OBJ_ChannelAccProfile.ManagerAccountProfileId = item.ManagerAccountProfileId;
                    foreach (var item1 in OBJ_ManagerProfileService.GetManagerForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.ManagerAccountProfileId)
                        {
                            OBJ_ChannelAccProfile.ManagerProfileNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.AuthStatusId = item.AuthStatusId;
                    OBJ_ChannelAccProfile.LastAction   = item.LastAction;
                    OBJ_ChannelAccProfile.LastUpdateDT = item.LastUpdateDT;
                    OBJ_ChannelAccProfile.MakeBy       = item.MakeBy;
                    OBJ_ChannelAccProfile.MakeDT       = item.MakeDT;
                    OBJ_ChannelAccProfile.TransDT      = item.TransDT;
                    OBJ_LIST_ChannelAccProfile.Add(OBJ_ChannelAccProfile);
                }
                return(OBJ_LIST_ChannelAccProfile);
            }
            catch (Exception ex)
            {
                _ObjErrorLogService = new ErrorLogService();
                _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllChannelAccProfile()", string.Empty);
                throw ex;
            }
        }
예제 #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ReturnMessage = string.Empty;
            //NormalUser = (UserInfo)Session["userInfo"];   //实际项目中从session中获取
            NormalUser         = new UserInfo();
            NormalUser.AreaNum = int.Parse(Server.HtmlEncode(Request.Cookies["userInfo"]["AreaNum"]));

            if (IsPostBack)
            {
                HttpPostedFile upFile = Request.Files[0];
                if (upFile.ContentLength > 0)
                {
                    string filePath = upFile.FileName;//全路径
                    string fileName = Path.GetFileName(filePath);
                    string fileExt  = Path.GetExtension(fileName);
                    if (fileExt == ".txt" || fileExt == ".docx" || fileExt == ".doc" || fileExt == ".pdf")
                    {
                        upFile.SaveAs(Request.MapPath("/AssessmentReport/" + DateTime.Now.Year.ToString() + "_Area_" + NormalUser.AreaNum + fileExt));
                    }
                }

                AreaInfo area = new AreaInfo();
                area.AreaNum    = Convert.ToUInt32(NormalUser.AreaNum);
                area.Attribute  = Convert.ToByte(Request.Form["attribute"]);
                area.PopQuality = Convert.ToByte(Request.Form["popQuality"]);
                area.BuildingFireResistanceRating = Convert.ToByte(Request.Form["buildingFireResistanceRating"]);
                area.PopDensity                       = Convert.ToByte(Request.Form["popDensity"]);
                area.BuildingYears                    = Convert.ToByte(Request.Form["buildingYears"]);
                area.FireSafetyManagement             = Convert.ToByte(Request.Form["fireSafetyManagement"]);
                area.AgingOfPowerLines                = Convert.ToByte(Request.Form["agingOfPowerLines"]);
                area.FireInspectionOfKeyBuildings     = Convert.ToByte(Request.Form["fireInspectionOfKeyBuildings"]);
                area.TimeFactor                       = 0;
                area.FireSafetyPropaganda             = Convert.ToByte(Request.Form["fireSafetyPropaganda"]);
                area.PowerLineLoad                    = Convert.ToByte(Request.Form["powerLineLoad"]);
                area.EconomicDensity                  = Convert.ToByte(Request.Form["economicDensity"]);
                area.HighBuildingsNum                 = Convert.ToByte(Request.Form["highBuildingsNum"]);
                area.UndergroundCrowdedSpace          = Convert.ToByte(Request.Form["undergroundCrowdedSpace"]);
                area.DensityOfKeyBuildings            = Convert.ToByte(Request.Form["densityOfKeyBuildings"]);
                area.RoadCongestion                   = Convert.ToByte(Request.Form["roadCongestion"]);
                area.BuildingDensity                  = Convert.ToByte(Request.Form["buildingDensity"]);
                area.DistributionOfInflammableStorage = Convert.ToByte(Request.Form["distributionOfInflammableStorage"]);
                area.FireStationCapacityCoverage      = Convert.ToByte(Request.Form["fireStationCapacityCoverage"]);
                area.FireStationEquipment             = Convert.ToByte(Request.Form["fireStationEquipment"]);
                area.PublicFireFacilities             = Convert.ToByte(Request.Form["publicFireFacilities"]);
                area.DepartmentalEmergencyResponse    = Convert.ToByte(Request.Form["departmentalEmergencyResponse"]);
                area.FireAndRescuePlan                = Convert.ToByte(Request.Form["fireAndRescuePlan"]);
                area.KeyBuildingsFirePreventBuilt     = Convert.ToByte(Request.Form["keyBuildingsFirePreventBuilt"]);
                area.AreaUploadTime                   = DateTime.Now;
                area.AreaAssessmentYear               = Convert.ToUInt32(DateTime.Now.Year);
                area.AreaRiskGrade                    = 0;
                area.AreaSize = 0;
                area.AreaPop  = 0;

                AreaInfoService areaService = new AreaInfoService();
                if (areaService.AddAreaInfo(area, out ReturnMessage))
                {
                    Response.Write("<script>alert('" + ReturnMessage + "');window.location = 'CheckAreaInfoPage.aspx';</script>");
                }
                else
                {
                    Response.Write("<script>alert('" + ReturnMessage + "');window.location = 'CheckAreaInfoPage.aspx';</script>");
                }
            }
            else
            {
            }
        }