예제 #1
0
 private void SetStoreInfo()
 {
     store                  = new StoreInfoModel();
     store.PhotoPath        = photo;
     store.StoreID          = sid;
     store.Number           = number;
     store.StoreName        = sname;
     store.CPCCode          = cp;
     store.StoreAddress     = address;
     store.PostalCode       = pcode;
     store.HomeTele         = homeTel;
     store.OfficeTele       = officetel;
     store.MobileTele       = mobiletel;
     store.FaxTele          = faxtel;
     store.BankCode         = Bank;
     store.BankCard         = bcard;
     store.Email            = e;
     store.NetAddress       = naddress;
     store.Remark           = r;
     store.StoreLevelInt    = sint;
     store.FareArea         = Convert.ToDecimal(farea);
     store.TotalInvestMoney = Convert.ToDecimal(stouzi);
     store.Direct           = DisposeString.DisString(txtDirect.Text);
     store.Name             = name;
     store.ExpectNum        = CommonDataBLL.getMaxqishu();
     store.LoginPass        = password;
     store.Currency         = Convert.ToInt32(CurrencyCode);
     store.OperateIp        = HttpContext.Current.Request.UserHostAddress;
     store.OperateNum       = Session["Company"].ToString();
     store.SCPPCode         = scpp;
 }
예제 #2
0
    protected void btnSeach_Click(object sender, EventArgs e)
    {
        StringBuilder sb = new StringBuilder();

        sb.Append("1=1 and iszx=1 and type=0 ");

        string mb = DisposeString.DisString(txtStoreid.Text);

        if (mb.Length > 0)
        {
            sb.Append(" and storeid like '%" + PageBase.InputText(this.txtStoreid.Text.Trim()) + "%'");
        }



        if (this.DatePicker2.Text != "")
        {
            sb.Append(" and year(zxdate)=year('" + PageBase.InputText(this.DatePicker2.Text) + "') and month(zxdate)=month('" + PageBase.InputText(this.DatePicker2.Text) + "') and day(zxdate)=day('" + PageBase.InputText(this.DatePicker2.Text) + "') ");
        }


        UserControl_ExpectNum exp = Page.FindControl("ExpectNum1") as UserControl_ExpectNum;
        int ExpectNum             = exp.ExpectNum;

        if (ExpectNum > 0)
        {
            sb.Append(" and zxqishu=" + ExpectNum);
        }

        ViewState["SQLSTR"] = "select id,iszx,storeid,name,storeoff.Number,zxqishu,zxdate,case when iszx=1 then '" + GetTran("001286", "已注销") + "' when iszx=2 then '" + GetTran("001287", "已恢复") + "' else '' end as zx from storeoff where " + sb.ToString();

        Pager pager = Page.FindControl("Pager1") as Pager;

        pager.PageBind(0, 10, "storeoff", "id,iszx,storeid,name,storeoff.Number,zxqishu,zxdate,case when iszx=1 then '" + GetTran("001286", "已注销") + "' when iszx=2 then '" + GetTran("001287", "已恢复") + "' else '' end as zx", sb.ToString(), "zxdate", "givTWmember");
    }
예제 #3
0
    protected void btnSeach_Click(object sender, EventArgs e)
    {
        StringBuilder sb = new StringBuilder();

        sb.Append("1=1 and iszx=1 and type=0");

        string mb = DisposeString.DisString(txt_member.Text);

        if (mb.Length > 0)
        {
            sb.Append(" and Number like '%" + PageBase.InputText(this.txt_member.Text.Trim()) + "%'");
        }


        if (this.DatePicker2.Text != "")
        {
            sb.Append(" and year(zxdate)=year('" + PageBase.InputText(this.DatePicker2.Text) + "') and month(zxdate)=month('" + PageBase.InputText(this.DatePicker2.Text) + "') and day(zxdate)=day('" + PageBase.InputText(this.DatePicker2.Text) + "') ");
        }

        UserControl_ExpectNum exp = Page.FindControl("ExpectNum1") as UserControl_ExpectNum;
        int ExpectNum             = exp.ExpectNum;

        if (ExpectNum > 0)
        {
            sb.Append(" and zxqishu=" + ExpectNum);
        }
        ViewState["SQLSTR"] = "select id,iszx,offReason,OperatorName,Name,Number,zxqishu,zxdate,case when iszx=1 then '" + GetTran("000000", "已冻结") + "' when iszx=2 then '" + GetTran("001287", "已恢复") + "' else '' end as zx from MemberoffSP ,memberinfobalance" + BLL.CommonClass.CommonDataBLL.GetMaxqishu() + " as b where " + sb.ToString();

        Pager pager = Page.FindControl("Pager1") as Pager;

        pager.PageBind(0, 10, "MemberOffSP ", "id,iszx,MemberOffSP.Name,offReason,Operator,MemberOffSP.Number,zxqishu,zxdate,case when iszx=1 then '" + GetTran("000000", "已冻结") + "' when iszx=2 then '" + GetTran("001287", "已恢复") + "' else '' end as zx", sb.ToString(), "zxdate", "givTWmember");
    }
예제 #4
0
    /// <summary>
    /// 验证控件
    /// </summary>
    private bool ValidateControl(out string valida, out double money, out string note)
    {
        valida = "";
        money  = 0;
        note   = "";
        if (string.IsNullOrEmpty(this.txtvali.Text.Trim()))
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("005769", "请输入验证人") + "')</script>");
            this.txtvali.Focus();
            return(false);
        }
        if (!double.TryParse(this.txtmoney.Text.Trim(), out money))
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("005770", "请认真填写扣款金额") + "')</script>");
            this.txtmoney.Focus();
            return(false);
        }
        if (money > double.Parse(this.labmoney.Text) || money < 0)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("005770", "请认真填写扣款金额") + "')</script>");
            this.txtmoney.Focus();
            return(false);
        }
        if (this.txtnote.Text.Trim() != null)
        {
            note = DisposeString.DisString(this.txtnote.Text.Trim(), "<,>,',-", "&lt;,&gt;,&#39;,&nbsp;", ",");
        }
        valida = DisposeString.DisString(this.txtvali.Text.Trim(), "<,>,',-", "&lt;,&gt;,&#39;,&nbsp;", ",");

        return(true);
    }
예제 #5
0
    protected void btnSeach_Click(object sender, EventArgs e)
    {
        StringBuilder sb = new StringBuilder();

        sb.Append("1=1");

        string mb = DisposeString.DisString(txt_member.Text);

        if (mb.Length > 0)
        {
            sb.Append(" and Number like '%" + this.txt_member.Text.Trim() + "%'");
        }
        if (this.DatePicker2.Text != "")
        {
            sb.Append(" and year(upddate)=year('" + this.DatePicker2.Text + "') and month(upddate)=month('" + this.DatePicker2.Text + "') and day(upddate)=day('" + this.DatePicker2.Text + "') ");
        }
        UserControl_ExpectNum exp = Page.FindControl("ExpectNum1") as UserControl_ExpectNum;
        int ExpectNum             = exp.ExpectNum;

        if (ExpectNum > 0)
        {
            sb.Append(" and ExpectNum=" + ExpectNum);
        }
        Pager pager = Page.FindControl("Pager1") as Pager;

        pager.PageBind(0, 10, "updatestore", "number ,oldstoreid,newstoreid,expectnum,case  flag when 1 then '" + GetTran("001032", "个人所属店铺重置") + "' when 2 then '" + GetTran("001035", "团队所属店铺重置") + "' end as flag, upddate", sb.ToString(), "upddate", "givTWmember");
        Translations();
    }
예제 #6
0
    protected void Button3_Click(object sender, EventArgs e)
    {
        int nowExpectNum = BLL.CommonClass.CommonDataBLL.getMaxqishu();

        if (nowExpectNum != 1)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("007094", "只有在第一期时才能初始化!") + "');</script>");
            return;
        }
        txtMemberId.Text = DisposeString.DisString(txtMemberId.Text.Trim());

        int count = BLL.CommonClass.CommonDataBLL.getCountNumber(txtMemberId.Text.Trim());

        if (count > 0)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert("该会员编号已存在!"));
            return;
        }

        Model.DefaultMessage def = GetModel(3, txtMemberId.Text.Trim());

        bool isSure = ManagerBLL.UpdateDefaultMember(def);

        if (!isSure)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert("修改失败!"));
            return;
        }

        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('修改成功!');</script>");
    }
예제 #7
0
    protected void btnSeach_Click(object sender, EventArgs e)
    {
        StringBuilder sb = new StringBuilder();

        sb.Append("1=1 ");
        string storeid = DisposeString.DisString(txtStoreId.Text);

        if (storeid.Length > 0)
        {
            sb.Append(" and Storeid='" + storeid + "'");
        }
        string storename = Encryption.Encryption.GetEncryptionName(DisposeString.DisString(txtStoreName.Text));

        if (storename.Length > 0)
        {
            sb.Append(" and StoreName like '" + storename + "%'");
        }
        UserControl_ExpectNum exp = Page.FindControl("ExpectNum1") as UserControl_ExpectNum;
        int ExpectNum             = exp.ExpectNum;

        if (ExpectNum > 0)
        {
            sb.Append(" and ExpectNum=" + ExpectNum);
        }
        ViewState["sql"] = sb.ToString();
        Pager pager = Page.FindControl("Pager1") as Pager;

        pager.PageBind(0, 10, "StoreInfo", "ID,StoreInfo.Number,StoreId,StoreInfo.Name,StoreName", sb.ToString(), "RegisterDate", "givStoreInfo");
        Translations();
    }
예제 #8
0
    private string Gettxt()
    {
        storeid        = DisposeString.DisString(txtStoreId.Text.Trim());
        number         = DisposeString.DisString(txtNumber.Text.Trim());
        storename      = DisposeString.DisString(txtStoreName.Text.Trim());
        scountry       = StoreCountry.SelectedItem.Value;
        storepriovince = StoreCity.SelectedItem.Value;
        UserControl_CountryCityPCode1 ucountry = Page.FindControl("CountryCity1") as UserControl_CountryCityPCode1;

        if (ucountry.CheckFill() == false)
        {
            return(GetTran("001278", "请选择国家地址"));
        }
        if (this.txtaddress.Text == "")
        {
            return(GetTran("001280", "地址不能为空!"));
        }
        country = ucountry.Country;
        //country = StoreCountryd.SelectedItem.Value;
        province = ucountry.Province;
        //province = StoreCountryp.SelectedItem.Value;
        // city = StoreCountryc.SelectedItem.Value;
        city       = ucountry.City;
        address    = DisposeString.DisString(txtaddress.Text);
        postalcode = DisposeString.DisString(txtPostalCode.Text);
        homeTel    = DisposeString.DisString(txtHomeTele.Text);
        officetel  = DisposeString.DisString(txtOfficeTele.Text);
        mobiletel  = DisposeString.DisString(txtMobileTele.Text);
        faxtel     = DisposeString.DisString(txtFaxTele.Text);
        bankCode   = ddlBank.SelectedItem.Value;
        bankCard   = DisposeString.DisString(txtBankCard.Text);
        email      = DisposeString.DisString(txtEmail.Text);
        netAddress = DisposeString.DisString(txtNetAddress.Text);
        remark     = DisposeString.DisString(txtRemark.Text);
        //storelevelstr = rdoListLevel.SelectedItem.Text;
        //storelevelint = int.Parse(rdoListLevel.SelectedItem.Value);
        if (DisposeString.DisString(txtFareArea.Text).Length > 0)
        {
            fareArea = DisposeString.DisString(txtFareArea.Text);
        }
        else
        {
            fareArea = "0";
        }
        fareBreed = DisposeString.DisString(txtFareBreed.Text);
        if (DisposeString.DisString(txtTotalAccountMoney.Text).Length > 0)
        {
            stouzi = DisposeString.DisString(txtTotalAccountMoney.Text);
        }
        else
        {
            stouzi = "0";
        }

        name = DisposeString.DisString(txtName.Text);

        return("");
    }
예제 #9
0
    public void getMemberInfo()
    {
        string Number      = DisposeString.DisString(this.Number.Text.Trim());
        string Name        = DisposeString.DisString(this.Name.Text.Trim());
        string Recommended = DisposeString.DisString(this.Recommended.Text.Trim());
        string Placement   = DisposeString.DisString(this.Placement.Text.Trim());
        int    ExpectNum   = 0;

        if (this.DropDownExpectNum.SelectedValue.ToString() == "")
        {
            ExpectNum = 0;
        }
        else
        {
            ExpectNum = Convert.ToInt32(this.DropDownExpectNum.SelectedItem.Value);
        }
        StringBuilder sb = new StringBuilder();

        sb.Append(" 1=1 ");
        if (Number.Length > 0)
        {
            sb.Append(" and Number like'%" + Number + "%'");
        }
        if (Name.Length > 0)
        {
            sb.Append(" and Name like'%" + Encryption.Encryption.GetEncryptionName(Name) + "%'");
        }
        if (Recommended.Length > 0)
        {
            sb.Append(" and Direct like'%" + Recommended + "%'");
        }
        if (Placement.Length > 0)
        {
            sb.Append(" and Placement like'%" + Placement + "%'");
        }
        if (ExpectNum > 0)
        {
            sb.Append(" and ExpectNum=" + ExpectNum);
        }
        //if (TextBox1.Text.Trim().Length > 0)
        //{
        //    sb.Append(" and StoreID like'%" + TextBox1.Text.Trim() + "%'");
        //}
        Pager pager = Page.FindControl("Pager1") as Pager;

        pager.Pageindex    = 0;
        pager.PageSize     = 10;
        pager.PageTable    = "MemberInfo";
        pager.Condition    = sb.ToString();
        pager.PageColumn   = "*";
        pager.ControlName  = "GridView1";
        pager.key          = "ID";
        pager.InitBindData = true;
        pager.PageBind();
        ViewState["condition"] = sb.ToString() + " order by registerdate desc";
        Translations();
    }
예제 #10
0
 private void SetUStoreInfo()
 {
     ustore               = new UnauditedStoreInfoModel();
     ustore.PhotoPath     = photo;
     ustore.StoreId       = sid;
     ustore.Number        = number;
     ustore.StoreName     = sname;
     ustore.StoreAddress  = address;
     ustore.PostalCode    = pcode;
     ustore.HomeTele      = homeTel;
     ustore.OfficeTele    = officetel;
     ustore.MobileTele    = mobiletel;
     ustore.FaxTele       = faxtel;
     ustore.Bank          = b;
     ustore.BankCard      = bcard;
     ustore.Email         = e;
     ustore.NetAddress    = naddress;
     ustore.Remark        = r;
     ustore.Currency      = Convert.ToInt32(CurrencyCode);
     ustore.StoreLevelInt = sint;
     ustore.OperateNum    = Session["Company"].ToString();
     try
     {
         ustore.FareArea = Convert.ToDecimal(farea);
     }
     catch (Exception)
     {
         BLL.CommonClass.Transforms.JSAlert(GetTran("000279", "输入的格式不对"));
         return;
     }
     ustore.FareBreed = fbreed;
     try
     {
         if (stouzi.ToString().Length > 0)
         {
             ustore.TotalinvestMoney = Convert.ToDecimal(stouzi);
         }
         else
         {
             ustore.TotalaccountMoney = 0;
         }
     }
     catch (Exception)
     {
         BLL.CommonClass.Transforms.JSAlert(GetTran("000279", "输入的格式不对"));
         return;
     }
     ustore.Direct    = DisposeString.DisString(txtDirect.Text);
     ustore.Name      = name;
     ustore.ExpectNum = CommonDataBLL.getMaxqishu();
     ustore.LoginPass = password;
     ustore.Language  = Convert.ToInt32(ddlLanaguage.SelectedItem.Value);
     ustore.OperateIp = HttpContext.Current.Request.UserHostAddress;
     ustore.SCPCCode  = scpp;
 }
예제 #11
0
    public void getBalanceToPurseDetail()
    {
        string Number = DisposeString.DisString(this.Number.Text.Trim());
        string Name   = Encryption.Encryption.GetEncryptionName(DisposeString.DisString(this.Name.Text.Trim()));

        int ExpectNum = 0;

        if (this.DropDownExpectNum.SelectedValue.ToString() == "")
        {
            ExpectNum = 0;
        }
        else
        {
            ExpectNum = Convert.ToInt32(this.DropDownExpectNum.SelectedItem.Value);
        }
        StringBuilder sb = new StringBuilder();

        sb.Append(" 1=1 and b.number=m.number and istuihui=0");
        if (Number.Length > 0)
        {
            sb.Append(" and b.Number like'%" + Number + "%'");
        }
        if (Name.Length > 0)
        {
            sb.Append(" and m.Name like'%" + Name + "%'");
        }

        if (ExpectNum > 0)
        {
            sb.Append(" and b.ExpectNum=" + ExpectNum);
        }


        ViewState["SQLSTR"] = "SELECT b.*,m.name FROM BalanceToPurseDetail b,memberinfo m WHERE " + sb.ToString() + " order by b.id desc";
        string asg   = ViewState["SQLSTR"].ToString();
        Pager  pager = Page.FindControl("Pager1") as Pager;

        pager.Pageindex    = 0;
        pager.PageSize     = 10;
        pager.PageTable    = "BalanceToPurseDetail b,memberinfo m";
        pager.Condition    = sb.ToString();
        pager.PageColumn   = " b.*,m.name ";
        pager.ControlName  = "GridView1";
        pager.key          = " b.id ";
        pager.InitBindData = true;
        pager.PageBind();


        Translations();
    }
예제 #12
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        txtManageId.Text = DisposeString.DisString(txtManageId.Text.Trim());
        Model.DefaultMessage def = GetModel(1, txtManageId.Text.Trim());

        bool isSure = ManagerBLL.UpdateDefaultManage(def);

        if (!isSure)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert("修改失败!"));
            return;
        }

        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('修改成功,请重新登录!');top.location.href('../logout.aspx')</script>");
    }
예제 #13
0
    /// <summary>
    /// 检查文件名字
    /// </summary>
    /// <returns></returns>
    ///
    private bool CheckFileNames()
    {
        if (this.txtResName.Text.Trim() == "")
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "alert('" + GetTran("001510", "资料名不能为空") + "!')", true);
            return(false);
        }
        ResourcesBLL resoucres = new ResourcesBLL();

        if (resoucres.CheckReourceResname(DisposeString.DisString(this.txtResName.Text.Trim().Trim())))
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "alert('" + GetTran("001512", "存在同名资料") + "!')", true);
            return(false);
        }
        return(true);
    }
예제 #14
0
    protected void btnSeach_Click(object sender, EventArgs e)
    {
        StringBuilder sb = new StringBuilder();

        sb.Append("1=1 and  mp.number=mi.number ");

        string mb = DisposeString.DisString(txt_member.Text);

        if (mb.Length > 0)
        {
            sb.Append(" and mobiletele like '%" + PageBase.InputText(this.txt_member.Text.Trim()) + "%'");
        }
        if (txtName.Text.Length > 0)
        {
            sb.Append(" and name like '%" + PageBase.InputText(this.txtName.Text.Trim()) + "%'");
        }


        if (this.DatePicker2.Text != "")
        {
            sb.Append(" and year(zxdate)=year('" + Convert.ToDateTime(PageBase.InputText(this.DatePicker2.Text)).ToUniversalTime() + "') and month(zxdate)=month('" + Convert.ToDateTime(PageBase.InputText(this.DatePicker2.Text)).ToUniversalTime() + "') and day(zxdate)=day('" + Convert.ToDateTime(PageBase.InputText(this.DatePicker2.Text)).AddDays(1).ToUniversalTime() + "') ");
        }


        UserControl_ExpectNum exp = Page.FindControl("ExpectNum1") as UserControl_ExpectNum;
        int ExpectNum             = exp.ExpectNum;

        if (ExpectNum > 0)
        {
            sb.Append(" and zxqishu=" + ExpectNum);
        }

        if (this.DropDownList1.SelectedValue != "0")
        {
            sb.Append(" and iszx=" + PageBase.InputText(this.DropDownList1.SelectedValue));
        }

        string col   = "mi.mobiletele,mp.Name,mp.Number,zxqishu,zxdate,case when iszx=1 then '" + GetTran("007542", "已冻结") + "' when iszx=2 then '" + GetTran("001287", "已恢复") + "' else '' end as zx,offReason,Operator,OperatorName";
        Pager  pager = Page.FindControl("Pager1") as Pager;

        pager.PageBind(0, 10, "MemberOffSP  mp ,memberinfo  mi", col, sb.ToString(), "mp.id", "givTWmember");

        ViewState["SQLSTR"] = "select " + col + " from MemberOffSP where " + sb.ToString();
    }
예제 #15
0
    private void Gettxt()
    {
        Bank      = this.ddlBank.SelectedValue.ToString();
        sid       = DisposeString.DisString(txtStoreId.Text.Trim());
        number    = DisposeString.DisString(txtNumber.Text.Trim());
        sname     = Encryption.Encryption.GetEncryptionName(DisposeString.DisString(txtStoreName.Text.Trim()));
        cp        = DBHelper.ExecuteScalar("select cpccode from city where country='" + this.CountryCity1.Country + "' and province='" + this.CountryCity1.Province + "' and city='" + this.CountryCity1.City + "'").ToString();
        address   = Encryption.Encryption.GetEncryptionAddress(DisposeString.DisString(txtaddress.Text));
        pcode     = DisposeString.DisString(txtPostalCode.Text);
        homeTel   = Encryption.Encryption.GetEncryptionTele(DisposeString.DisString(txtHomeTele.Text));
        officetel = Encryption.Encryption.GetEncryptionTele(DisposeString.DisString(txtOfficeTele.Text));
        mobiletel = Encryption.Encryption.GetEncryptionTele(DisposeString.DisString(txtMobileTele.Text));
        faxtel    = Encryption.Encryption.GetEncryptionTele(DisposeString.DisString(txtFaxTele.Text));
        bcard     = Encryption.Encryption.GetEncryptionCard(DisposeString.DisString(txtBankCard.Text));
        e         = DisposeString.DisString(txtEmail.Text);
        naddress  = DisposeString.DisString(txtNetAddress.Text);
        r         = DisposeString.DisString(txtRemark.Text);
        sint      = int.Parse(rdoListLevel.SelectedItem.Value);
        if (DisposeString.DisString(txtFareArea.Text).Length > 0)
        {
            farea = decimal.Parse(DisposeString.DisString(txtFareArea.Text));
        }
        else
        {
            farea = 0;
        }
        fbreed = DisposeString.DisString(txtFareBreed.Text);
        if (DisposeString.DisString(txtTotalAccountMoney.Text).Length > 0)
        {
            stouzi = decimal.Parse(DisposeString.DisString(txtTotalAccountMoney.Text));
        }
        else
        {
            stouzi = 0;
        }

        name = Encryption.Encryption.GetEncryptionName(DisposeString.DisString(txtName.Text));
        string scp = DBHelper.ExecuteScalar("select cpccode from city where country='" + this.StoreCountry.SelectedValue.ToString() + "' and province='" + this.StoreCity.SelectedValue.ToString() + "'").ToString();

        scpp = scp.Substring(0, 4);

        CurrencyCode = DBHelper.ExecuteScalar("select rateid from country where countrycode='" + scpp.Substring(0, 2) + "'").ToString();
    }
예제 #16
0
    //绑定页面
    private void PageBind()
    {
        StringBuilder sb = new StringBuilder();

        sb.Append(" 1=1 ");
        if (txtName.Text.Trim().Replace("'", "").Length > 0)
        {
            sb.Append(" and ResName like '%" + DisposeString.DisString(txtName.Text.Trim().Replace("'", "")) + "%'");
        }
        if (txtfilename.Text.Trim().Replace("'", "").Length > 0)
        {
            sb.Append(" and FileName like '%" + DisposeString.DisString(txtfilename.Text.Trim().Replace("'", "")) + "%'");
        }
        ViewState["pagewhere"] = sb.ToString() + " order by resid desc";
        Pager pager = Page.FindControl("Pager1") as Pager;

        pager.PageBind(0, 10, "Resources", "ResID, ResName, FileName, ResDescription, ResSize, ResDateTime, ResTimes", sb.ToString(), "ResID", "givshowFile");
        Translations_More();
    }
예제 #17
0
    /// <summary>
    /// 绑定
    /// </summary>
    public void bind()
    {
        string condition = string.Empty;
        string mark      = string.Empty;

        if (txt_StoreID.Text.Trim() == "")
        {
            mark = "LIKE";
        }
        else
        {
            mark = "=";
        }
        condition = DisposeString.DisString(this.txt_StoreID.Text.Trim(), "<,>,',-", "&lt;,&gt;,&#39;,&nbsp;", ",");
        //VIPCardManageBll cardbll = new VIPCardManageBll();
        //this.DataGrid1.DataSource = cardbll.GetCardRange(condition, mark);
        //this.DataBind();
        string sql = " 1=1 ";

        if (mark == "LIKE")
        {
            sql = sql + "  and  StoreID  like '%" + condition + "%'";
        }
        else
        {
            sql = sql + "  and  StoreID = '" + condition + "'";
        }
        string isfenpei  = GetTran("005603", "已分配");
        string notfenpei = GetTran("005601", "未分配");

        this.Pager1.ControlName = "DataGrid1";
        this.Pager1.key         = "id";
        this.Pager1.PageColumn  = "  id,RangeID,StoreID,BeginCard,EndCard,inuse,CASE inuse WHEN 1 THEN '" + isfenpei + "' ELSE '" + notfenpei + "' END AS _inuse  ";
        this.Pager1.Pageindex   = 0;
        this.Pager1.PageTable   = "VIPCardRange";
        this.Pager1.Condition   = sql;
        this.Pager1.PageSize    = 10;
        this.Pager1.PageCount   = 0;
        this.Pager1.PageBind();

        ViewState["SQLSTR"] = "select id,RangeID,StoreID,BeginCard,EndCard,inuse,CASE inuse WHEN 1 THEN '" + isfenpei + "' ELSE '" + notfenpei + "' END AS _inuse from VIPCardRange where " + sql + " order by id desc";
        Translations();
    }
예제 #18
0
    /// <summary>
    /// 新增卡号
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Button1_Click(object sender, EventArgs e)
    {
        int    RangeID   = CommonDataBLL.getMaxqishu() + 1;
        string ToStoreID = "";
        string inuse     = "0";
        int    count     = VIPCardManageBll.valiStore(DisposeString.DisString(this.txt_ToStoreID.Text.Trim(), "<,>,',-", "&lt;,&gt;,&#39;,&nbsp;", ","));

        if (count == 0)
        {
            ToStoreID = "";
            inuse     = "0";
            ScriptHelper.SetAlert(Page, GetTran("000388", "店铺") + txt_ToStoreID.Text.Trim() + GetTran("001584", "不存在!"));
            return;
        }
        else
        {
            ToStoreID = txt_ToStoreID.Text.Trim();
            inuse     = "1";
        }
        VIPCardRangeModel vipmodel = new VIPCardRangeModel();

        vipmodel.RangeID   = RangeID;
        vipmodel.StoreID   = ToStoreID;
        vipmodel.BeginCard = Convert.ToInt32(txt_BeginCard.Text.Trim());
        vipmodel.EndCard   = Convert.ToInt32(txt_EndCard.Text.Trim());
        vipmodel.InUse     = Convert.ToInt32(inuse);
        int vipcard = VIPCardManageBll.Addvipcard(vipmodel);

        if (vipcard > 0)
        {
            ScriptHelper.SetAlert(Page, GetTran("001583", "新增卡号范围成功,") + ((inuse == "1") ? GetTran("001581", "分配到店铺") + ToStoreID : GetTran("001580", "未分配到店铺")));
        }
        else
        {
            ScriptHelper.SetAlert(Page, GetTran("001541", "操作失败!!!"));
            return;
        }

        btn_Query_Click1(null, null);
        Translations();
    }
예제 #19
0
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        if (this.txtstoreId.Text.ToString().Length < 1)
        {
            this.msg = "<script language='javascript'>alert('" + GetTran("001018", "请输入会员编号!") + "')</script>";
            return;
        }

        //判断登录者是否有更改此会员的权限
        string manageId = BLL.CommonClass.CommonDataBLL.getManageID(1);

        if (txtstoreId.Text.Trim() == manageId)
        {
            msg = "<script>alert('" + GetTran("007131", "对不起,您没有更改此会员的权限!") + "');</script>";
            return;
        }

        if (DisposeString.DisString(txtstoreId.Text.Trim()) == "")
        {
            Response.End();
        }
        //OwnerStoreResetBLL owner = new OwnerStoreResetBLL();
        MemberInfoModel member = OwnerStoreResetBLL.GetMemberInfoById(DisposeString.DisString(txtstoreId.Text.Trim()));

        if (member != null)
        {
            tbShow.Visible     = true;
            lblMemberID.Text   = member.Number.ToString();
            lblName.Text       = Encryption.Encryption.GetDecipherName(member.Name);
            lblOldStoreID.Text = member.StoreID;
        }
        else
        {
            this.tbShow.Visible = false;
            this.msg            = "<script language='javascript'>alert('" + GetTran("001021", "你输入的会员不存在!") + "')</script>";
            // ScriptHelper.SetAlert(btnSearch,"你输入的会员不存在!!!");
            return;
        }
        Translations();
    }
예제 #20
0
    /// <summary>
    /// 绑定数据
    /// </summary>
    private void GetShopList2()
    {
        StringBuilder condition = new StringBuilder();
        string        table     = " Remittances a left join MemberInfo b on b.Number=a.RemitNumber left join Withdraw c on a.ID=c.hkid ";

        condition.Append(" a.relationorderid='' and c.shenhestate<>-1 and a.shenhestate<>-1 and a.RemitStatus=1 and b.Number='" + Session["Member"].ToString() + "' ");
        string BeginRiQi = "";
        string EndRiQi   = "";

        if (this.Datepicker1.Text != "")
        {
            DateTime time = DateTime.Now.ToUniversalTime();
            bool     b    = DateTime.TryParse(Datepicker1.Text.Trim(), out time);
            if (!b)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000827", "时间格式不正确!") + "')</script>");
                return;
            }
            BeginRiQi = this.Datepicker1.Text.Trim().ToString();
            DisposeString.DisString(BeginRiQi, "'", "");
            if (this.Datepicker2.Text != "")
            {
                b = DateTime.TryParse(Datepicker2.Text.Trim(), out time);
                if (!b)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000827", "时间格式不正确!") + "')</script>");
                    return;
                }
                EndRiQi = (DateTime.Parse(this.Datepicker2.Text).AddHours(23).AddMinutes(59).AddSeconds(59)).ToString();
                DisposeString.DisString(EndRiQi, "'", "");

                condition.Append(" and ReceivablesDate>= '" + BeginRiQi + "' and ReceivablesDate<='" + EndRiQi + "'");
            }
            else
            {
                condition.Append(" and ReceivablesDate>= '" + BeginRiQi + "'");
            }
        }
        else
        {
            if (this.Datepicker2.Text != "")
            {
                DateTime time = DateTime.Now.ToUniversalTime();
                bool     b    = DateTime.TryParse(Datepicker2.Text.Trim(), out time);
                if (!b)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000827", "时间格式不正确!") + "')</script>");
                    return;
                }
                EndRiQi = (DateTime.Parse(this.Datepicker2.Text.Trim()).AddHours(23).AddMinutes(59).AddSeconds(59)).ToString();
                condition.Append(" and ReceivablesDate<='" + EndRiQi + "'");
            }
        }

        if (this.DropDownList1.SelectedValue != "-1")
        {
            condition.Append(" and IsGSQR='" + this.DropDownList1.SelectedValue.Trim() + "' ");
        }
        string cloumns = " isnull(c.hkid,-1) hkid,isnull(c.shenhestate,a.shenhestate) shenhestate,a.isgsqr,a.remittancesid,a.RemittancesMoney,a.RemittancesCurrency,a.RemitNumber,a.Sender,a.Managers,a.ImportBank,a.PayWay,a.Remittancesid,a.[Use],a.StandardCurrency,a.ConfirmType,a.SenderID,a.RemitMoney,a.PayExpectNum,a.Id,a.ReceivablesDate,a.PayExpectNum,a.isgsqr,a.Remark ";
        string key     = "a.id";
        //ViewState["key"] = key;
        //ViewState["PageColumn"] = cloumns;
        //ViewState["table"] = table;
        //ViewState["condition"] = condition.ToString();
        string sql = "select " + cloumns + " from " + table + " where 1=1 and  " + condition.ToString() + " order by " + key + " desc ";

        this.ucPagerMb1.PageSize = 10;
        this.ucPagerMb1.PageInit(sql, "rep");

        //this.GridView2.DataSourceID = null;
        //this.Pager1.ControlName = "rep";
        //this.Pager1.key = key;
        //this.Pager1.PageColumn = cloumns;
        //this.Pager1.Pageindex = 0;
        //this.Pager1.PageTable = table;
        //this.Pager1.Condition = condition.ToString();
        //this.Pager1.PageSize = 10;
        //this.Pager1.PageCount = 0;
        //this.Pager1.PageBind();
        Translations();
    }
예제 #21
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        StoreRegisterBLL member = new StoreRegisterBLL();

        int exists = 0;

        exists = (int)DBHelper.ExecuteScalar("SELECT COUNT(*) FROM MemberInfo WHERE Number='" + this.txtNumber.Text + "'", CommandType.Text);
        if (exists <= 0)
        {
            BLL.CommonClass.Transforms.JSAlert(GetTran("000288", "对不起,该会员编号不存在"));
            return;
        }
        if (DBHelper.ExecuteScalar("select memberstate from memberinfo where number='" + this.txtNumber.Text + "'").ToString() == "0")
        {
            BLL.CommonClass.Transforms.JSAlert(GetTran("000284", "该会员已注销,请先激活"));
            return;
        }
        if (StoreRegisterConfirmBLL.CheckStoreId(DisposeString.DisString(txtStoreId.Text)))
        {
            BLL.CommonClass.Transforms.JSAlert(GetTran("000291", "对不起,店铺编号已存在"));
            return;
        }

        if (!StoreRegisterBLL.CheckMemberInfoByNumber(DisposeString.DisString(txtDirect.Text)))
        {
            BLL.CommonClass.Transforms.JSAlert(GetTran("000293", "对不起,推荐店铺编号会员不存在"));
            return;
        }
        if (this.CountryCity1.Country == "请选择")
        {
            BLL.CommonClass.Transforms.JSAlert(GetTran("000300", "请选择地址"));
            return;
        }
        if (this.CountryCity1.Province == "请选择")
        {
            BLL.CommonClass.Transforms.JSAlert(GetTran("000300", "请选择地址"));
            return;
        }
        if (this.CountryCity1.City == "请选择")
        {
            BLL.CommonClass.Transforms.JSAlert(GetTran("000300", "请选择地址"));
            return;
        }
        if (this.txtaddress.Text == "")
        {
            BLL.CommonClass.Transforms.JSAlert(GetTran("001280", "地址不能为空!"));
            return;
        }
        if (this.txtRemark.Text.ToString().Length > 150)
        {
            BLL.CommonClass.Transforms.JSAlert(GetTran("006896", "对不起,备注应在150个字以内!"));
            return;
        }
        if (this.txtFareBreed.Text.ToString().Length > 150)
        {
            BLL.CommonClass.Transforms.JSAlert(GetTran("006896", "对不起,经营品种应在150个字以内!"));
            return;
        }
        if (Session["LoginUserType"].ToString().ToLower() == "manage")
        {
            GetPassword();
            Gettxt();
            SetStoreInfo();
            if (StoreRegisterBLL.RegisterStoreInfo(store, "S"))
            {
                msg = "<script language='javascript'>alert('" + GetTran("000023", "注册成功") + "!');location.href('StoreInfoModify.aspx')</script>";
            }
        }
        else
        {
            GetPassword();
            Gettxt();
            SetStoreInfo();
            BLL.other.Company.StoreRegisterBLL ss = new BLL.other.Company.StoreRegisterBLL();
            if (StoreRegisterBLL.RegisterStoreInfo(store, "U"))
            {
                //ScriptHelper.SetAlert(this.btnAdd, "注册成功!!!");
                BLL.CommonClass.Transforms.JSAlert(GetTran("000023", "注册成功"));
            }
        }
    }
예제 #22
0
    /// <summary>
    /// 提交
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Button1_Click(object sender, EventArgs e)
    {
        this.question.Text = question.Text.Trim();
        this.money.Text    = money.Text.Trim();

        //设置特定值防止重复提交
        hid_fangzhi.Value = "0";

        if (this.rad_Deduct.SelectedValue == "")
        {
            ScriptHelper.SetAlert(Page, GetTran("007748", "请选择补扣款项"));
            return;
        }
        string    number = "";
        string    sql    = "select number from MemberInfo where MobileTele='" + txtbh.Text + "'";
        DataTable shj    = DBHelper.ExecuteDataTable(sql);

        if (shj.Rows.Count > 0)
        {
            number = shj.Rows[0][0].ToString();
        }
        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("002096", "无此编号,请检查后再重新输入") + "!')</script>");
            return;
        }


        if (number != "" && this.question.Text != "" && this.money.Text != "")
        {
            string vquestion;

            //判断会员是否存在
            if (DeductBLL.IsExist(number))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("002096", "无此编号,请检查后再重新输入") + "!')</script>");
                return;
            }
            double d;
            if (!double.TryParse(money.Text, out d))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("002095", "金额输入有误") + "!')</script>");
                return;
            }
            if (d <= 0)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script >alert('" + GetTran("001539", "操作失败,输入的金额不能小于0") + "!')</script>");
                return;
            }
            else
            {
                int iskou = int.Parse(rad_Deduct.SelectedValue); //0为扣,1为补

                vquestion = this.question.Text.Trim();
                DeductModel model = new DeductModel();
                model.Number       = DisposeString.DisString(number.Trim(), "<,>,',-", "&lt;,&gt;,&#39;,&nbsp;", ",");
                model.DeductMoney  = d;
                model.DeductReason = vquestion;
                model.ExpectNum    = CommonDataBLL.getMaxqishu();
                model.IsDeduct     = iskou;
                model.Actype       = 1;
                model.OperateIP    = CommonDataBLL.OperateIP;
                model.OperateNum   = CommonDataBLL.OperateBh;
                try
                {
                    if (DeductBLL.AddDeduct(model))
                    {
                        ClientScript.RegisterStartupScript(this.GetType(), "", "<script >alert('" + GetTran("000006", "添加成功") + "!');window.location.href='DeductSalary.aspx';</script>");
                    }
                    else
                    {
                        ClientScript.RegisterStartupScript(this.GetType(), "", "<script >alert('" + GetTran("000007", "添加失败") + "!')</script>");
                    }
                }
                catch (Exception)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "", "<script >alert('" + GetTran("001507", "操作失败") + "!')</script>");
                }
            }
        }
        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script >alert('" + GetTran("002094", "所有项必填,请重新输入") + "!')</script>");
        }
        clear();
    }
예제 #23
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
        {
            ProviderInfoModel provider = new ProviderInfoModel();
            provider.Address     = txtAddress.Text.Trim();
            provider.BankAddress = txtBankAddress.Text.Trim();
            provider.BankName    = ddlBankName.SelectedValue;
            provider.BankNumber  = txtBankNumber.Text.Trim();
            provider.ID          = Convert.ToInt32(ViewState["id"]);
            provider.DutyNumber  = txtDutyNumber.Text.Trim();
            provider.Email       = txtEmail.Text.Trim();
            provider.Fax         = txtFax.Text.Trim();
            provider.ForShort    = txtForShort.Text.Trim();
            provider.LinkMan     = txtLinkMan.Text.Trim();

            provider.Mobile    = txtMobile.Text.Trim();
            provider.Name      = txtName.Text.Trim();
            provider.Number    = lblNumber.Text.Trim();
            provider.Remark    = txtRemark.Text.Trim();
            provider.Telephone = txtTelephone.Text.Trim();

            provider.Url = txtUrl.Text.Trim();

            provider.OperateIP     = Request.UserHostAddress;
            provider.OperateNum    = CommonDataBLL.OperateBh;
            provider.Status        = 1;
            provider.PermissionMan = "";

            int providerNameIsExist = ProviderManageBLL.ProviderNameIsExist(provider.ID, provider.Name);
            if (providerNameIsExist > 0)
            {
                this.msg = "<script language='javascript'>alert('" + GetTran("001170", "该供应商名称已被注册,请换一个供应商名称!") + "');</script>";
                return;
            }
            BLL.CommonClass.ChangeLogs cl_h_info = new BLL.CommonClass.ChangeLogs("ProviderInfo", "(ltrim(rtrim(id)))");
            cl_h_info.AddRecord(Convert.ToInt32(provider.ID));
            int updCount = ProviderManageBLL.UpdatePrivider(provider);
            if (updCount > 0)
            {
                cl_h_info.AddRecord(Convert.ToInt32(provider.ID));                                                                                             //不能放到事务中  修改数据后
                cl_h_info.ModifiedIntoLogs(BLL.CommonClass.ChangeCategory.company6, Session["Company"].ToString(), BLL.CommonClass.ENUM_USERTYPE.objecttype4); //不能放到事务中

                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("000222", "修改成功!") + "');location.href='Provider_ViewEdit.aspx'</script>");
            }
            else
            {
                ScriptHelper.SetAlert(this.Page, GetTran("001190", "修改失败,请检查你输入的信息!"));
            }
        }

        //Add Provider
        else
        {
            string number = DisposeString.DisString(txtnumber.Text.Trim());
            if (ProviderManageBLL.GetProviderinfoNumber(number))
            {
                this.msg = "<script language='javascript'>alert('" + GetTran("001162", "该供应商编号已被注册,请换一个供应商编号!") + "');</script>";
                return;
            }
            if (ProviderManageBLL.ProviderNameIsExist(txtName.Text.Trim()) > 0)
            {
                this.msg = "<script language='javascript'>alert('" + GetTran("001170", "该供应商名称已被注册,请换一个供应商名称!") + "');</script>";
                return;
            }
            ProviderInfoModel provider = new ProviderInfoModel();
            provider.Address     = DisposeString.DisString(txtAddress.Text.Trim());
            provider.BankAddress = DisposeString.DisString(txtBankAddress.Text.Trim());
            provider.BankName    = DisposeString.DisString(ddlBankName.SelectedValue);
            provider.BankNumber  = DisposeString.DisString(txtBankNumber.Text.Trim());
            provider.DutyNumber  = DisposeString.DisString(txtDutyNumber.Text.Trim());
            provider.Email       = DisposeString.DisString(txtEmail.Text.Trim());
            provider.Fax         = DisposeString.DisString(txtFax.Text.Trim());
            provider.ForShort    = DisposeString.DisString(txtForShort.Text.Trim());
            provider.LinkMan     = DisposeString.DisString(txtLinkMan.Text.Trim());
            provider.Mobile      = DisposeString.DisString(txtMobile.Text.Trim());
            provider.Name        = DisposeString.DisString(txtName.Text.Trim());

            provider.Remark        = DisposeString.DisString(txtRemark.Text.Trim());
            provider.Telephone     = DisposeString.DisString(txtTelephone.Text.Trim());
            provider.Url           = DisposeString.DisString(txtUrl.Text.Trim());
            provider.OperateIP     = Request.UserHostAddress;
            provider.OperateNum    = CommonDataBLL.OperateBh;
            provider.Status        = 1;
            provider.Number        = number;
            provider.PermissionMan = "";

            int addCount = ProviderManageBLL.AddPrivider(provider);
            if (addCount > 0)
            {
                this.msg = "<script language='javascript'>alert('" + GetTran("001194", "保存成功!") + "');location.href='Provider_ViewEdit.aspx'</script>";
            }
            else
            {
                ScriptHelper.SetAlert(this.btnSave, GetTran("001177", "添加失败,请检查你输入的信息!"));
            }
        }
    }
예제 #24
0
    protected void BtnSeach_Click(object sender, EventArgs e)
    {
        string        table     = "StoreInfo";
        string        name      = Encryption.Encryption.GetEncryptionName(DisposeString.DisString(this.txtname.Text));
        string        storeid   = DisposeString.DisString(this.txtstoreid.Text);
        string        storename = Encryption.Encryption.GetEncryptionName(DisposeString.DisString(this.txtstorename.Text));
        int           ExpectNum = Convert.ToInt32(this.drpExpectNum.SelectedItem.Value);
        string        level     = dplLevel.SelectedValue;
        StringBuilder sb        = new StringBuilder();

        sb.Append(" 1=1 and  StoreState=1");
        if (name.Length > 0)
        {
            sb.Append(" and Name='" + name + "'");
        }
        if (storename.Length > 0)
        {
            sb.Append(" and StoreName='" + storename + "'");
        }
        if (storeid.Length > 0)
        {
            sb.Append(" and StoreId='" + storeid + "'");
        }
        if (level != "-1")
        {
            sb.Append(" and storelevelint=" + dplLevel.SelectedValue);
        }
        string totalDataStart = txtBox_OrderDateTimeStart.Text.Trim();
        string totalDataEnd   = txtBox_OrderDateTimeEnd.Text.Trim();

        if (totalDataStart != "")
        {
            Convert.ToDateTime(totalDataStart);
            sb.Append(" and dateadd(hour," + sphours + ",RegisterDate)>='" + totalDataStart + " 00:00:00'");
        }
        if (totalDataEnd != "")
        {
            Convert.ToDateTime(totalDataEnd);
            sb.Append(" and dateadd(hour," + sphours + ",RegisterDate)<='" + totalDataEnd + " 23:59:59'");
        }
        if (ExpectNum > 0)
        {
            sb.Append(" and ExpectNum=" + ExpectNum);
        }
        ViewState["sql"]    = sb.ToString();
        ViewState["SQLSTR"] = "SELECT ID,StoreInfo.Number,StoreID,StoreInfo.Name,StoreName,TotalAccountMoney,(TotalAccountMoney-TotalOrderGoodMoney-(select isnull(sum(ActualStorage*PreferentialPrice*(-1)),0) from Product,stock where Product.ProductId=stock.ProductId and stock.StoreId=StoreInfo.Storeid and ActualStorage<0)) as kebaodane,(TotalAccountMoney-TotalOrderGoodMoney) as kedinghuoe,ExpectNum,Direct,RegisterDate,StoreLevelInt,SCPCCode FROM StoreInfo  WHERE " + sb;
        Pager pager = this.Page.FindControl("Pager1") as Pager;

        pager.PageTable    = table;
        pager.PageColumn   = "ID,StoreInfo.Number,StoreID,StoreInfo.Name,StoreName,StoreInfo.TotalAccountMoney,(TotalAccountMoney-TotalOrderGoodMoney-(select isnull(sum(ActualStorage*PreferentialPrice*(-1)),0) from Product,stock where Product.ProductId=stock.ProductId and stock.StoreId=StoreInfo.Storeid and ActualStorage<0)) as kebaodane,(TotalAccountMoney-TotalOrderGoodMoney) as kedinghuoe,ExpectNum,Direct,RegisterDate,StoreLevelInt,SCPCCode";
        pager.PageSize     = 10;
        pager.Condition    = sb.ToString();
        pager.key          = "ID";
        pager.ControlName  = "GridView1";
        pager.PageCount    = 0;
        pager.Pageindex    = 0;
        pager.InitBindData = true;
        pager.PageBind();

        Translations();
    }
예제 #25
0
    public void getBalanceToPurseDetail()
    {
        string Number = DisposeString.DisString(this.Number.Text.Trim());
        string Name   = Encryption.Encryption.GetEncryptionName(DisposeString.DisString(this.Name.Text.Trim()));

        bool blean = ReleaseBLL.IsProvide(Convert.ToInt32(ViewState["qs"].ToString()));

        if (blean)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(" 1=1 and b.number=m.number and b.isyxj=1 and b.ExpectNum=" + ViewState["qs"].ToString());
            if (Number.Length > 0)
            {
                sb.Append(" and b.Number like'%" + Number + "%'");
            }
            if (Name.Length > 0)
            {
                sb.Append(" and m.Name like'%" + Name + "%'");
            }

            ViewState["SQLSTR"] = "SELECT b.*,m.name FROM BalanceToPurseDetail b,memberinfo m WHERE " + sb.ToString() + " isyxj=1 order by b.id desc";
            string asg   = ViewState["SQLSTR"].ToString();
            Pager  pager = Page.FindControl("Pager1") as Pager;
            pager.Pageindex    = 0;
            pager.PageSize     = 10;
            pager.PageTable    = "BalanceToPurseDetail b,memberinfo m";
            pager.Condition    = sb.ToString();
            pager.PageColumn   = " b.*,m.name ";
            pager.ControlName  = "GridView1";
            pager.key          = " b.id ";
            pager.InitBindData = true;
            pager.PageBind();
        }
        else
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(" 1=1 and b.number=m.number and b.isyxj=1 and b.ExpectNum=" + ViewState["qs"].ToString());
            if (Number.Length > 0)
            {
                sb.Append(" and b.Number like'%" + Number + "%'");
            }
            if (Name.Length > 0)
            {
                sb.Append(" and m.Name like'%" + Name + "%'");
            }
            ViewState["SQLSTR"] = "SELECT b.Number,b.CurrentOneMark,b.Bonus1,b.Bonus2,b.Bonus3,b.Bonus4,b.Bonus5,b.Bonus6,b.Bonus7,b.Bonus8,b.DeductTax as Total,b.CurrentSolidSend,m.name, b.ExpectNum as ExpectNum,'" + DateTime.Now.ToUniversalTime() + "' as TransferToPurseDate,0 as bqbukuan FROM BalanceToPurseDetail b,memberinfo m WHERE " + sb.ToString() + " order by m.id desc";
            string asg   = ViewState["SQLSTR"].ToString();
            Pager  pager = Page.FindControl("Pager1") as Pager;
            pager.Pageindex    = 0;
            pager.PageSize     = 10;
            pager.PageTable    = " BalanceToPurseDetail b,memberinfo m";
            pager.Condition    = sb.ToString();
            pager.PageColumn   = " b.Number,b.CurrentOneMark,b.Bonus1,b.Bonus2,b.Bonus3,b.Bonus4,b.Bonus5,b.Bonus6,b.Bonus7,b.Bonus8,b.DeductTax as Total,b.CurrentSolidSend,m.name,b.ExpectNum as ExpectNum,'" + DateTime.Now.ToUniversalTime() + "' as TransferToPurseDate,0 as bqbukuan  ";
            pager.ControlName  = "GridView1";
            pager.key          = " b.id ";
            pager.InitBindData = true;
            pager.PageBind();
        }

        Translations();
    }
예제 #26
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        lblmessage.Text = "";
        //string manageId = BLL.CommonClass.CommonDataBLL.getManageID(3);
        //if (this.txtbh.Text.Trim() == manageId)
        //{
        //    ScriptHelper.SetAlert(Page, manageId + GetTran("000714", "不可以调网") + "!");
        //    return;
        //}
        string    number  = DisposeString.DisString(this.txtbh.Text, "'", "").Trim();
        string    sqltele = "select number from MemberInfo where MobileTele='" + number + "'";
        DataTable shjjjj  = DBHelper.ExecuteDataTable(sqltele);

        if (shjjjj.Rows.Count > 0)
        {
            number = shjjjj.Rows[0][0].ToString();
            if (number == "")
            {
                lblmessage.Text      = GetTran("000000", "会员编号不能为空!");
                this.lblwz.Text      = "";
                this.lblbh.Text      = "";
                this.lbltuijian.Text = "";
                // this.lblanzhi.Text = "";
                this.txttuijian.Text = "";
                //this.txtanzhi.Text = "";
                return;
            }
            if (ChangeTeamBLL.CheckNum(number))
            {
                lblmessage.Text      = GetTran("000000", "会员编号不存在!");
                this.lblwz.Text      = "";
                this.lblbh.Text      = "";
                this.lbltuijian.Text = "";
                //this.lblanzhi.Text = "";
                this.txttuijian.Text = "";
                //this.txtanzhi.Text = "";
                return;
            }


            DataTable dt = ChangeTeamBLL.GetMemberInfoDataTable(number);

            this.lblwz.Text = GetTran("006767", "网络调整编号") + "&nbsp;";
            this.lblbh.Text = this.txtbh.Text + "&nbsp;&nbsp;&nbsp;&nbsp;" + GetTran("000107", "姓名") + ":" + StoreRegisterBLL.GetMemberName(number.ToString());
            if (dt.Rows.Count > 0)
            {
                if (dt.Rows[0][0].ToString() != "" && dt.Rows[0][0].ToString() != null)
                {
                    string    tName = StoreRegisterBLL.GetMemberName(dt.Rows[0][0].ToString());
                    string    sql   = "select MobileTele from MemberInfo where number='" + dt.Rows[0][0].ToString() + "'";
                    DataTable shj   = DBHelper.ExecuteDataTable(sqltele);
                    this.lbltuijian.Text = shj.Rows[0][0].ToString() + "<br/>" + tName;

                    this.txttuijian.Text = shj.Rows[0][0].ToString();

                    this.Label1.Text   = tName;
                    ViewState["oldTj"] = shj.Rows[0][0].ToString();
                }
                else
                {
                    string tName = "";

                    this.lbltuijian.Text = "";

                    this.txttuijian.Text = "";

                    this.Label1.Text = tName;

                    ViewState["oldTj"] = "";
                }
            }
        }

        flag = true;
    }
예제 #27
0
    protected void BtnSeach_Click(object sender, EventArgs e)
    {
        string name      = Encryption.Encryption.GetEncryptionName(DisposeString.DisString(this.txtname.Text));
        string storeid   = DisposeString.DisString(this.txtstoreid.Text);
        string storename = Encryption.Encryption.GetEncryptionName(DisposeString.DisString(this.txtstorename.Text));
        string level     = dplLevel.SelectedValue;
        int    ExpectNum = 0;
        UserControl_ExpectNum texpectnum = Page.FindControl("ExpectNum1") as UserControl_ExpectNum; //这边使用as转换没有必要使用try catch来捕获异常,因为使用as时,不能转换不会报异常只会返回一个null

        if (texpectnum == null)
        {
            ExpectNum = -1;
        }
        else
        {
            ExpectNum = texpectnum.ExpectNum;
        }
        StringBuilder sb = new StringBuilder();

        sb.Append(" 1=1 ");
        if (name.Length > 0)
        {
            sb.Append(" and Name like '" + name + "%'");
        }
        if (storename.Length > 0)
        {
            sb.Append(" and StoreName like '" + storename + "%'");
        }
        if (storeid.Length > 0)
        {
            sb.Append(" and StoreId='" + storeid + "'");
        }
        if (level != "-1")
        {
            sb.Append(" and storelevelint=" + dplLevel.SelectedValue);
        }
        string totalDataStart = txtBox_OrderDateTimeStart.Text.Trim();
        string totalDataEnd   = txtBox_OrderDateTimeEnd.Text.Trim();

        if (totalDataStart != "")
        {
            Convert.ToDateTime(totalDataStart);
            sb.Append(" and dateadd(hour," + sphours + ",RegisterDate)>='" + totalDataStart + " 00:00:00'");
        }
        if (totalDataEnd != "")
        {
            Convert.ToDateTime(totalDataEnd);
            sb.Append(" and dateadd(hour," + sphours + ",RegisterDate)<='" + totalDataEnd + " 23:59:59'");
        }
        if (ExpectNum > 0)
        {
            sb.Append(" and ExpectNum=" + ExpectNum);
        }
        ViewState["sql"] = sb.ToString();
        Pager pager = this.Page.FindControl("Pager1") as Pager;

        pager.PageTable   = " StoreInfo";
        pager.PageColumn  = "ID,StoreInfo.Number,StoreID,StoreInfo.Name,StoreName,TotalAccountMoney,(TotalAccountMoney-TotalOrderGoodMoney-(select isnull(sum(ActualStorage*PreferentialPrice*(-1)),0) from Product,stock where Product.ProductId=stock.ProductId and stock.StoreId=StoreInfo.Storeid and ActualStorage<0)) as kebaodane,(TotalAccountMoney-TotalOrderGoodMoney) as kedinghuoe,ExpectNum,Direct,RegisterDate,StoreLevelInt,SCPCCode";
        pager.PageSize    = 10;
        pager.Condition   = sb.ToString();
        pager.key         = "ID";
        pager.ControlName = "givSearchStoreInfo";
        pager.Pageindex   = 0;
        pager.PageBind();
        Translations();
    }
예제 #28
0
    //绑定汇率历史记录
    private void GetShopList3()
    {
        DateTime      time      = DateTime.Now.ToUniversalTime();
        bool          b         = true;
        StringBuilder condition = new StringBuilder();
        string        table     = " DayPrice ";

        condition.Append("1=1");

        string BeginRiQi = "";
        string EndRiQi   = "";

        if (this.Datepicker1.Text != "")
        {
            b = DateTime.TryParse(this.Datepicker1.Text, out time);
            if (!b)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000827", "时间格式不正确!") + "')</script>");
                return;
            }
            BeginRiQi = this.Datepicker1.Text.Trim().ToString();
            DisposeString.DisString(BeginRiQi, "'", "");
            if (this.Datepicker2.Text != "")
            {
                b = DateTime.TryParse(this.Datepicker2.Text, out time);
                if (!b)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000827", "时间格式不正确!") + "')</script>");
                    return;
                }
                EndRiQi = (DateTime.Parse(this.Datepicker2.Text).AddHours(23).AddMinutes(59).AddSeconds(59)).ToString();
                DisposeString.DisString(EndRiQi, "'", "");

                condition.Append(" and convert(datetime,NowDate, 20)>= '" + BeginRiQi + "' and convert(datetime,NowDate, 20)<='" + EndRiQi + "'");
            }
            else
            {
                condition.Append(" and convert(datetime,NowDate, 20)>= '" + BeginRiQi + "'");
            }
        }
        else
        {
            if (this.Datepicker2.Text != "")
            {
                b = DateTime.TryParse(this.Datepicker2.Text, out time);
                if (!b)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000827", "时间格式不正确!") + "')</script>");
                    return;
                }
                EndRiQi = (DateTime.Parse(this.Datepicker2.Text.Trim()).AddHours(23).AddMinutes(59).AddSeconds(59)).ToString();
                condition.Append(" and convert(datetime,NowDate, 20)<='" + EndRiQi + "'");
            }
        }


        string cloumns = " * ";
        string key     = "id";

        ViewState["key"]            = key;
        ViewState["PageColumn"]     = cloumns;
        ViewState["table"]          = table;
        ViewState["condition"]      = condition.ToString();
        this.GridView2.DataSourceID = null;
        this.Pager1.ControlName     = "GridView2";
        this.Pager1.key             = key;
        this.Pager1.PageColumn      = cloumns;
        this.Pager1.Pageindex       = 0;
        this.Pager1.PageTable       = table;
        this.Pager1.Condition       = condition.ToString();
        this.Pager1.PageSize        = 10;
        this.Pager1.PageCount       = 0;
        this.Pager1.PageBind();
    }
예제 #29
0
    /// <summary>
    /// 绑定数据
    /// </summary>
    private void DataBind()
    {
        StringBuilder sb    = new StringBuilder();
        string        table = "";

        //会员
        if (ViewState["Kmtype"].ToString() == "AccountXJ")//现金账户
        {
            table = "memberaccount"; sb.Append("and number='" + Session["Member"].ToString() + "' and SfType=1 and happenmoney!=0");
        }
        else if (ViewState["Kmtype"].ToString() == "AccountXF")//消费账户
        {
            table = "memberaccount"; sb.Append("and number='" + Session["Member"].ToString() + "' and SfType=0 and happenmoney!=0");
        }
        else if (ViewState["Kmtype"].ToString() == "AccountFX")//复消账户
        {
            table = "memberaccount"; sb.Append("and number='" + Session["Member"].ToString() + "' and SfType=2 and happenmoney!=0");
        }
        else if (ViewState["Kmtype"].ToString() == "AccountFXth")//复消提货账户
        {
            table = "memberaccount"; sb.Append("and number='" + Session["Member"].ToString() + "' and SfType=3 and happenmoney!=0");
        }
        else if (ViewState["Kmtype"].ToString() == "AccountZSJF")//赠送积分
        {
            table = "memberaccount"; sb.Append("and number='" + Session["Member"].ToString() + "' and SfType=4 and happenmoney!=0");
        }
        else if (ViewState["Kmtype"].ToString() == "AccountSFJF")//释放积分
        {
            table = "memberaccount"; sb.Append("and number='" + Session["Member"].ToString() + "' and SfType=5 and happenmoney!=0");
        }

        //店铺
        else if (ViewState["Kmtype"].ToString() == "AccountDH")//订货款账户
        {
            table = "storeaccount"; sb.Append("and number='" + Session["Store"].ToString() + "' and SfType=0 and happenmoney!=0");
        }
        else if (ViewState["Kmtype"].ToString() == "AccountZZ")//周转款账户
        {
            table = "storeaccount"; sb.Append("and number='" + Session["Store"].ToString() + "' and SfType=1 and happenmoney!=0");
        }

        string BeginRiQi = "";
        string EndRiQi   = "";

        string kmtype = Request.Form["chb_name"];

        if (kmtype != null)
        {
            sb.Append(" and kmtype in(" + kmtype + ")");
        }
        if (ddl_OutIn.SelectedValue != "-1")
        {
            sb.Append(" and Direction=" + ddl_OutIn.SelectedValue);
        }

        if (this.Datepicker1.Text != "")
        {
            DateTime time = DateTime.Now.ToUniversalTime();
            bool     b    = DateTime.TryParse(Datepicker1.Text.Trim(), out time);
            if (!b)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000827", "时间格式不正确!") + "')</script>");
                return;
            }
            BeginRiQi = this.Datepicker1.Text.Trim().ToString();
            DisposeString.DisString(BeginRiQi, "'", "");
            if (this.Datepicker2.Text != "")
            {
                b = DateTime.TryParse(Datepicker2.Text.Trim(), out time);
                if (!b)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000827", "时间格式不正确!") + "')</script>");
                    return;
                }
                EndRiQi = (DateTime.Parse(this.Datepicker2.Text).AddHours(23).AddMinutes(59).AddSeconds(59)).ToString();
                DisposeString.DisString(EndRiQi, "'", "");

                sb.Append(" and happentime>= '" + BeginRiQi + "' and happentime<='" + EndRiQi + "'");
            }
            else
            {
                sb.Append(" and happentime>= '" + BeginRiQi + "'");
            }
        }
        else
        {
            if (this.Datepicker2.Text != "")
            {
                DateTime time = DateTime.Now.ToUniversalTime();
                bool     b    = DateTime.TryParse(Datepicker2.Text.Trim(), out time);
                if (!b)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000827", "时间格式不正确!") + "')</script>");
                    return;
                }
                EndRiQi = (DateTime.Parse(this.Datepicker2.Text.Trim()).AddHours(23).AddMinutes(59).AddSeconds(59)).ToString();
                sb.Append(" and happentime<='" + EndRiQi + "'");
            }
        }
        ViewState["Sql"] = "select isnull(sum(ABS(isnull(happenmoney,0))),0) as happenmoney from " + table + " where 1=1  " + sb.ToString();
        //获取汇率
        currency = AjaxClass.GetCurrency(int.Parse(Session["Default_Currency"] == null ? bzCurrency.ToString() : Session["Default_Currency"].ToString()));
        //转入0  转出1
        happenmoney = "happenmoney*" + currency + " as happenmoney";
        //结余金额
        string Balancemoney = "Balancemoney*" + currency + " as Balancemoney";
        //
        string cloumns = "id,number,happentime,Direction,sftype,kmtype,remark" + "," + happenmoney + "," + Balancemoney;
        string key     = "id";

        if (table != "")
        {
            lit_heji.Text = GetHappenMoney(ViewState["Sql"].ToString());
            string sql = "select " + cloumns + " from " + table + " where 1=1  " + sb.ToString() + " order by " + key + " desc ";
            this.ucPagerMb1.PageSize = 10;
            this.ucPagerMb1.PageInit(sql, rep_km.UniqueID);
        }
        else
        {
            Response.Redirect("../member/index.aspx");
        }
    }
예제 #30
0
    protected void btn_re_Click(object sender, EventArgs e)
    {
        string    number  = txtbh.Text.Trim();
        string    direct  = DisposeString.DisString(this.txttuijian.Text, "'", "").Trim();
        string    sqltele = "select number from MemberInfo where MobileTele='" + direct + "'";
        DataTable shjjjj  = DBHelper.ExecuteDataTable(sqltele);

        string    sql = "select number from MemberInfo where MobileTele='" + number + "'";
        DataTable shj = DBHelper.ExecuteDataTable(sql);

        number = shj.Rows[0][0].ToString();

        if (shjjjj.Rows.Count > 0)
        {
            direct = shjjjj.Rows[0][0].ToString();



            string olddirect = "";
            if (ViewState["oldTj"] != null)
            {
                olddirect = ViewState["oldTj"].ToString();
            }


            if (this.lblbh.Text.Trim() == "")
            {
                lblmessage.Text = GetTran("000723", "会员编号不能为空!");
                return;
            }
            if (direct == "")
            {
                lblmessage.Text = GetTran("000716", "推荐编号不能为空!");
                return;
            }
            if (ChangeTeamBLL.CheckNum(direct))
            {
                lblmessage.Text = GetTran("000717", "推荐编号不存在!");
                return;
            }

            string manageId = BLL.CommonClass.CommonDataBLL.getManageID(3);
            if (this.txtbh.Text.Trim() == manageId)
            {
                ScriptHelper.SetAlert(Page, manageId + GetTran("000714", "不可以调网") + "!");
                return;
            }

            lblmessage.Text = "";

            Application.Lock();



            int      newqushu     = 1; //AddOrderDataDAL.GetDistrict(placement, 1);
            DateTime nowTime      = DateTime.UtcNow;
            int      maxExpectNum = CommonDataBLL.GetMaxqishu();
            int      j            = 0;
            j = TempHistoryDAL.ExecuteUpdateNet(number, olddirect, direct, 0, maxExpectNum, newqushu, CommonDataBLL.OperateBh, nowTime);


            if (j >= 0)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('调网成功');window.location.href='../twQuery.aspx';</script>");
            }
            else
            {
                this.lblwz.Text      = "";
                this.lblbh.Text      = "";
                this.lbltuijian.Text = "";

                this.txttuijian.Text = "";

                this.txtbh.Text = "";
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('调网失败');</script>");
            }
            Application.UnLock();
        }
    }