Esempio n. 1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     Daxu.Entity.businessman businessmaninfo = new businessman();
     businessmaninfo.sh = "已审核";
     businessmaninfo.id = Convert.ToInt32(Request.QueryString["id"]);
     Daxu.BLL.businessmanBll.UpdateIbusinessman(businessmaninfo);
     Response.Write("<script>alert(\"审核通过\");location.href='Audit.aspx';</script>");
 }
Esempio n. 2
0
    protected void Calculate()
    {
        List<Daxu.Entity.businessman> busmanList = Daxu.BLL.businessmanBll.GetIbusinessmanData("select * from businessman where sh='已审核' and Wealth=1") as List<Daxu.Entity.businessman>;
        foreach (Daxu.Entity.businessman busmaninfo in busmanList)
        {
           TimeSpan time=Convert.ToDateTime(busmaninfo.datatimefast).AddDays(30).Date - DateTime.Now.Date;
           Daxu.Entity.businessman businfo = new Daxu.Entity.businessman();
           businfo.getdata =  time.Days;
           if (businfo.getdata > 0)
           {
               businfo.Wealth = "1";
               businfo.id = Convert.ToInt32(busmaninfo.id);
               Daxu.BLL.businessmanBll.UpdateIbusinessman(businfo);

           }
           else if (businfo.getdata < 0)
           {
               businfo.Wealth = "0";
               businfo.getdata = 0;
               businfo.id = Convert.ToInt32(busmaninfo.id);
               Daxu.BLL.businessmanBll.UpdateIbusinessman( businfo);
           }
        }
    }
Esempio n. 3
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "del")
        {

            int id = Convert.ToInt32(e.CommandArgument);
            Daxu.Entity.businessman businessmaninfo=new Daxu.Entity.businessman();
            businessmaninfo.text="0";
            businessmaninfo.id = id;
            Daxu.BLL.businessmanBll.UpdateIbusinessman(businessmaninfo);
            BinderDataList();

        }
    }
Esempio n. 4
0
    /// <summary>
    /// 取消活动
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "del")
        {

            int id = Convert.ToInt32(e.CommandArgument);
            Daxu.Entity.businessman businessmanInfo = new Daxu.Entity.businessman();
            businessmanInfo.getdata = 0;
            businessmanInfo.datatimefast = DateTime.Now;
            businessmanInfo.Wealth = "0";
            businessmanInfo.id = id;

            Daxu.BLL.businessmanBll.UpdateIbusinessman( businessmanInfo);
            BinderDataList();
        }
    }
Esempio n. 5
0
    /// <summary>
    /// 批量删除
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
        for (int i = 0; i < GridView1.Rows.Count; i++)
        {
            CheckBox check = (CheckBox)GridView1.Rows[i].FindControl("CheckBox1");

            if (check.Checked)
            {
                //int dd =  Convert.ToInt32( GridView1.DataKeys[GridView1.Rows[i].RowIndex]);
                DataKey datakey = GridView1.DataKeys[i];
                int id = Convert.ToInt32(datakey["id"]);
                Daxu.Entity.businessman businessmanInfo = new Daxu.Entity.businessman();
                businessmanInfo.getdata = 0;
                businessmanInfo.datatimefast = null;
                businessmanInfo.Wealth = "0";
                businessmanInfo.id = id;
                Daxu.BLL.businessmanBll.UpdateIbusinessman(businessmanInfo);
                BinderDataList();
            }
        }
    }
Esempio n. 6
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        //获取数据库的数据
        string sql = "select * from businessman where id='" + Convert.ToInt32(Request.QueryString["id"]) + "'";
        Daxu.Entity.businessman businessmaninfo = Daxu.BLL.businessmanBll.getIbusinessmanModel(sql);
        Daxu.Entity.businessman Busmaninfo = new businessman();

        string str = null;
        int sum = Convert.ToInt32(businessmaninfo.Credit);
        //如何审核通过就给信誉值加上相应的的值 拼接【审核参数】
        if (_HealthimgBox.Checked == true)
        {
            str += "1,";
            sum += 50;
            Busmaninfo.Health = "Healthtg.jpg"; //更换通过审核后的图片

            //增加信誉
            Daxu.Entity.collection collinfo = new collection();
            collinfo.businfo = Convert.ToString(businessmaninfo.id);
            collinfo.myCreditime = DateTime.Now.ToString("yyyy-MM-dd");
            collinfo.Text = "卫生许可证审核通过,系统奖励您50个点";
            collinfo.creditdata = 50;
            Daxu.BLL.collectionBll.InsertIcollection(collinfo);

        }
        if (_BusinessimgBox.Checked == true)
        {
            str += "3,";
            sum += 50;
            Busmaninfo.Business = "Businesstg.jpg"; //更换通过审核后的图片
            Daxu.Entity.collection collinfo = new collection();
            collinfo.businfo = Convert.ToString(businessmaninfo.id);
            collinfo.myCreditime = DateTime.Now.ToString("yyyy-MM-dd");
            collinfo.Text = "营业执照审核通过,系统奖励您50个点";
            collinfo.creditdata = 50;
            Daxu.BLL.collectionBll.InsertIcollection(collinfo);

        }
        if (_TaximgBox.Checked == true)
        {
            str += "2";
            sum += 50;
            Busmaninfo.Tax = "Taxtg.jpg"; //更换通过审核后的图片
            Daxu.Entity.collection collinfo = new collection();
            collinfo.businfo = Convert.ToString(businessmaninfo.id);
            collinfo.myCreditime = DateTime.Now.ToString("yyyy-MM-dd");
            collinfo.Text = "税务登记证审核通过,系统奖励您50个点";
            collinfo.creditdata = 50;
            Daxu.BLL.collectionBll.InsertIcollection(collinfo);

        }
        Busmaninfo.Credit = sum; //信誉增加
        Busmaninfo.AUDparameters = str;
        if (Busmaninfo.AUDparameters != null && Busmaninfo.AUDparameters != "")
        {
            if (Busmaninfo.AUDparameters.Contains("1") && Busmaninfo.AUDparameters.Contains("2") && Busmaninfo.AUDparameters.Contains("3"))
            {
                  Busmaninfo.text = "0";//清空为0表示在列表页就不显示了
            }
        }

        businessmaninfo.id = Convert.ToInt32(Request.QueryString["id"]);
        Daxu.BLL.businessmanBll.UpdateIbusinessman(businessmaninfo);
        Response.Write("<script>alert(\"审核通过\");location.href='Certification.aspx';</script>");
    }
Esempio n. 7
0
    protected void Calculate()
    {
        List<Daxu.Entity.Activity> DyimgList = Daxu.BLL.ActivityBll.GetIActivityData("select * from Activity ") as List<Daxu.Entity.Activity>;
        foreach (Daxu.Entity.Activity Dyimginfo in DyimgList)
        {
            TimeSpan time = Convert.ToDateTime(Dyimginfo.datetime).AddDays(30).Date - DateTime.Now;
            Daxu.Entity.Activity Activityinfo = new Daxu.Entity.Activity();
            Activityinfo.days = (time.Days).ToString();
            if (Convert.ToInt32(Activityinfo.days) > 0)
            {
                Activityinfo.id = Convert.ToInt32(Dyimginfo.id);
                Daxu.BLL.ActivityBll.UpdateIActivity(Activityinfo);
            }
            else if (Convert.ToInt32(Activityinfo.days) < 0)
            {     //系统信息
                string sql1="select * from pageinfo  where id=1";
                Daxu.Entity.pageinfo pageinfo=Daxu.BLL.pageinfoBll.getIpageinfoModel(sql1);

                string sql = "select * from businessman where id='"+ Convert.ToInt32(Dyimginfo.businessmanId)+"'";
                Daxu.Entity.businessman busman= Daxu.BLL.businessmanBll.getIbusinessmanModel(sql);
                Daxu.Entity.businessman busmaninfo = new Daxu.Entity.businessman();
                busmaninfo.Balance = busman.Balance + pageinfo.dian;
                busmaninfo.id = Convert.ToInt32(Dyimginfo.businessmanId);
                Daxu.BLL.businessmanBll.UpdateIbusinessman(busmaninfo);

                Daxu.Entity.balanceSj bananceSjinfo = new Daxu.Entity.balanceSj();//商家点数明细表
                bananceSjinfo.Text = "感谢" + busman.RestaurantName + "参加平台举办" + Dyimginfo.fenleiname + "活动" + "为此奖励" + pageinfo.dian + "个积分!" + DateTime.Now.ToString("yyyy-mm-dd") + "";

                //发送信息
                bananceSjinfo.Rechargetime = DateTime.Now.Date.ToString();
                bananceSjinfo.RechargeJe = Convert.ToDecimal(pageinfo.dian);
                bananceSjinfo.businessmanId = Dyimginfo.businessmanId;
                bananceSjinfo.cx = "1";
                Daxu.BLL.balanceSjBll.InsertIbalanceSj(bananceSjinfo);

                Daxu.BLL.ActivityBll.DeleteIActivity( Convert.ToInt32(Dyimginfo.id));
            }
        }
    }