Beispiel #1
0
    protected void StoreCountry_SelectedIndexChanged(object sender, EventArgs e)
    {
        SqlDataReader dr = StoreInfoEditBLL.bindCity(this.StoreCountry.SelectedValue.ToString());

        this.StoreCity.Items.Clear();
        while (dr.Read())
        {
            ListItem list2 = new ListItem(dr["Province"].ToString(), dr["Province"].ToString());
            this.StoreCity.Items.Add(list2);
        }
        dr.Close();
    }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.CustomerCreateStore);
        if (!IsPostBack)
        {
            DataTable dtct = StoreInfoEditBLL.bindCountry();
            foreach (DataRow item in dtct.Rows)
            {
                this.DropDownList1.Items.Add(new ListItem(item["name"].ToString(), item["name"].ToString()));
                this.StoreCountry.Items.Add(new ListItem(item["name"].ToString(), item["name"].ToString()));
            }
            SqlDataReader dr1 = StoreInfoEditBLL.bindCity(this.StoreCountry.SelectedValue.ToString());
            while (dr1.Read())
            {
                ListItem list2 = new ListItem(dr1["Province"].ToString(), dr1["Province"].ToString());
                this.StoreCity.Items.Add(list2);
            }
            dr1.Close();

            DataTable dt = DBHelper.ExecuteDataTable("select levelint,levelstr from bsco_level where levelflag=1 order by levelint");
            rdoListLevel.DataSource     = dt;
            rdoListLevel.DataTextField  = "levelstr";
            rdoListLevel.DataValueField = "levelint";
            rdoListLevel.DataBind();
            rdoListLevel.SelectedValue = DBHelper.ExecuteScalar("select top 1 levelint from bsco_level where levelflag=1 order by levelint").ToString();

            DropDownList1_SelectedIndexChanged(null, null);
            ddlLanaguage.DataSource     = CommonDataBLL.GetLanaguage();
            ddlLanaguage.DataTextField  = "Name";
            ddlLanaguage.DataValueField = "ID";
            ddlLanaguage.DataBind();
            Currency.DataSource     = CommonDataBLL.GetCurrency();
            Currency.DataTextField  = "Name";
            Currency.DataValueField = "ID";
            Currency.DataBind();
            if (Session["LoginUserType"].ToString() == "manage")
            {
                lbltitel.Text = GetTran("000554", "添加店信息");
            }
            else
            {
                lbltitel.Text = GetTran("000555", "店铺注册");
            }
            if (this.CountryCity1.City != "")
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>GetCCode_s2('" + this.CountryCity1.City + "')</script>");
            }
        }
        Translations();
    }
Beispiel #3
0
    //读取详细信息
    public void getDetial(int id)
    {
        StoreInfoModel storeInfo = StoreInfoEditBLL.GetStoreInfoById(id);

        this.Number.Text     = storeInfo.Number.ToString();
        this.StoreID.Text    = storeInfo.StoreID.ToString();
        ViewState["StoreID"] = storeInfo.StoreID.ToString();
        this.Name.Text       = Encryption.Encryption.GetDecipherName(storeInfo.Name.ToString());
        this.StoreName.Text  = Encryption.Encryption.GetDecipherName(storeInfo.StoreName.ToString());
        this.Address.Text    = Encryption.Encryption.GetDecipherAddress(storeInfo.StoreAddress.ToString());
        this.HomeTele.Text   = Encryption.Encryption.GetDecipherTele(storeInfo.HomeTele.ToString());
        this.OfficeTele.Text = Encryption.Encryption.GetDecipherTele(storeInfo.OfficeTele.ToString());
        this.MobileTele.Text = Encryption.Encryption.GetDecipherTele(storeInfo.MobileTele.ToString());
        this.txtDirect.Text  = storeInfo.Direct.ToString();
        this.FaxTele.Text    = Encryption.Encryption.GetDecipherTele(storeInfo.FaxTele.ToString());
        txtEbank.Text        = storeInfo.Bankbranchname;
        //SqlDataReader dr1 = DBHelper.ExecuteReader("select BankName from memberbank where BankCode='" + storeInfo.BankCode.ToString() + "'");
        //if (dr1.Read())
        //{
        //    this.MemberBank1.SelectedValue = dr1["BankName"].ToString();
        //}
        storeInfo.Bank = new MemberBankModel();
        if (storeInfo.BankCode.ToString() == "000000")
        {
            this.DropDownList1.SelectedValue = DBHelper.ExecuteScalar("select top 1 name from country").ToString();
        }
        else
        {
            this.DropDownList1.SelectedValue = DBHelper.ExecuteScalar("select b.name from memberbank a,country b where a.countrycode=b.id and bankcode='" + storeInfo.BankCode.ToString() + "'").ToString();
        }
        CommonDataBLL.BindCountry_Bank(this.DropDownList1.SelectedValue.ToString(), MemberBank1);
        this.MemberBank1.SelectedValue = storeInfo.BankCode.ToString();

        //this.Bank.Text = storeInfo.Bank.ToString();
        this.BankCard.Text   = Encryption.Encryption.GetDecipherCard(storeInfo.BankCard.ToString());
        this.NetAddress.Text = storeInfo.NetAddress.ToString();
        this.Email.Text      = storeInfo.Email.ToString();
        this.Remark.Text     = storeInfo.Remark.ToString();
        this.Label1.Text     = storeInfo.Direct.ToString();//推荐店铺编号
        this.Language.Text   = storeInfo.Language.ToString();
        this.ExpectNum.Text  = storeInfo.ExpectNum.ToString();
        // SetDate(Convert.ToDateTime(reader["RegisterDate"]));

        this.RegisterDate.Text = storeInfo.RegisterDate.AddHours(BLL.other.Company.WordlTimeBLL.ConvertAddHours()).ToString();


        if (storeInfo.StoreLevelInt.ToString() != "0")
        {
            this.StoreLevelInt.SelectedValue = storeInfo.StoreLevelInt.ToString(); //绑定级别
        }
        else
        {
            this.StoreLevelInt.SelectedValue = "0";
        }
        this.FareArea.Text         = storeInfo.FareArea.ToString();
        this.TotalInvestMoney.Text = storeInfo.TotalInvestMoney.ToString("f2");

        this.PostolCode.Text = storeInfo.PostalCode.ToString();

        SqlDataReader dr = DBHelper.ExecuteReader("select country,province,city,xian from city where cpccode='" + storeInfo.CPCCode.ToString() + "'");

        if (dr.Read())
        {
            this.CountryCity1.State = false;
            this.CountryCity1.SelectCountry(dr["Country"].ToString(), dr["Province"].ToString(), dr["City"].ToString(), dr["xian"].ToString());
        }
        string        country = DBHelper.ExecuteScalar("select top 1 country from city where cpccode like'" + storeInfo.SCPCCode.ToString() + "%'").ToString();
        SqlDataReader dr1     = StoreInfoEditBLL.bindCity(country);

        while (dr1.Read())
        {
            ListItem list2 = new ListItem(dr1["Province"].ToString(), dr1["Province"].ToString());
            this.StoreCity.Items.Add(list2);
        }
        dr.Close();
        dr1.Close();
        this.StoreCountry.SelectedValue = country;
        string province = DBHelper.ExecuteScalar("select top 1 province from city where country='" + country + "' and cpccode like'" + storeInfo.SCPCCode.ToString() + "%'").ToString();

        this.StoreCity.SelectedValue = province;

        ViewState["PhotoPath"] = storeInfo.PhotoPath.ToString();
        ViewState["PhotoH"]    = 0;
        ViewState["PhotoW"]    = 0;
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ThreeRedirect(Page, Permissions.redirUrl);
        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));
        Response.Cache.SetExpires(DateTime.Now);
        //Permissions.CheckManagePermission(EnumCompanyPermission.CustomerCreateStore);
        if (!IsPostBack)
        {
            if (Session["Member"] != null)
            {
                txtNumber.Text     = Session["Member"].ToString();
                txtNumber.ReadOnly = true;
            }

            //如果该会员有自己的服务机构,那么就直接显示服务机构的记录,
            //如果没有,就直接显示申请服务机构的页面
            //先判断中间表UnauditedStoreInfo里是否有数据,如果有数据,是未审核;如果没有记录,就是查询storeinfo表里是否有记录,
            if (int.Parse(DAL.DBHelper.ExecuteScalar("select count(0) from storeinfo where number='" + Session["Member"].ToString() + "'").ToString()) > 0)
            {
                Response.Redirect("ShowRegStore.aspx");
                return;
            }

            DataTable dtct = StoreInfoEditBLL.bindCountry();
            foreach (DataRow item in dtct.Rows)
            {
                this.DropDownList2.Items.Add(new ListItem(item["name"].ToString(), item["name"].ToString()));
                this.StoreCountry.Items.Add(new ListItem(item["name"].ToString(), item["name"].ToString()));
            }

            SqlDataReader dr1 = StoreInfoEditBLL.bindCity(this.StoreCountry.SelectedValue.ToString());
            while (dr1.Read())
            {
                ListItem list2 = new ListItem(dr1["Province"].ToString(), dr1["Province"].ToString());
                this.StoreCity.Items.Add(list2);
            }
            dr1.Close();
            //DataTable dt = DBHelper.ExecuteDataTable("select levelint,levelstr from bsco_level where levelflag=1 order by levelint");
            //rdoListLevel.DataSource = dt;
            //rdoListLevel.DataTextField = "levelstr";
            //rdoListLevel.DataValueField = "levelint";
            //rdoListLevel.DataBind();
            //rdoListLevel.SelectedValue = DBHelper.ExecuteScalar("select top 1 levelint from bsco_level where levelflag=1 order by levelint").ToString();
            // BLL.CommonClass.CommonDataBLL common = new CommonDataBLL();
            DropDownList2_SelectedIndexChanged(null, null);
            ddlLanaguage.DataSource     = CommonDataBLL.GetLanaguage();
            ddlLanaguage.DataTextField  = "Name";
            ddlLanaguage.DataValueField = "ID";
            ddlLanaguage.DataBind();
            Currency.DataSource     = CommonDataBLL.GetCurrency();
            Currency.DataTextField  = "Name";
            Currency.DataValueField = "ID";
            Currency.DataBind();
            CommonDataBLL.BindQishuList(this.DropDownList1, false);
            //if (Session["LoginUserType"].ToString() == "manage")
            //{
            //    btnGetmember.Visible = true;
            //    lbltitel.Text = "添加店信息";
            //}
            //else
            //{
            //lbltitel.Text = "店铺注册";
            //    btnGetmember.Visible = false;
            //}
        }
        Translations();
    }