Example #1
0
 private void CzNum()
 {
     using (WXDBEntities db = new WXDBEntities())
     {
         try
         {
             //var strsql = "";
             var strsql = new StringBuilder();
             strsql.Append("update effect set Orders=60  where Status=1 ");
             strsql.Append("update effect set Orders=50  where Status=2 ");
             strsql.Append("update effect set Orders=30  where Status=3 ");
             strsql.Append("update effect set Orders=25  where Status=4 ");
             strsql.Append("update effect set Orders=20  where Status=5 ");
             strsql.Append("update effect set Orders=15  where Status=6 ");
             strsql.Append("update effect set Orders=9  where Status=7 ");
             strsql.Append("update effect set Orders=5  where Status=8 ");
             db.ExecuteStoreCommand(strsql.ToString());
             string jsonstrlist = JsonHelper.GetJsonString(new jsonResult {
                 code = "", result = "", count = 1
             });
             _context.Response.Write(jsonstrlist);
         }
         catch (Exception ext)
         {
             string jsonstrlist = JsonHelper.GetJsonString(new jsonResult {
                 code = ext.Message, result = "", count = 0
             });
             _context.Response.Write(jsonstrlist);
         }
     }
 }
Example #2
0
 protected void btnUpdateStatus_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(ltlCName.Text))
     {
         jsHint.Back("请联系客户绑定银行卡信息有进行操作!");
         return;
     }
     using (WXDBEntities db = new WXDBEntities())
     {
         var tmpid = Convert.ToInt32(Request.Params["isid"]);
         var model = db.RegisterInfo.Where(s => s.Id == tmpid).FirstOrDefault();
         if (drpyj.SelectedValue == "0")
         {
             jsHint.Back("若确认佣金支付成功,请选择是");
             return;
         }
         if (model != null)
         {
             if (!string.IsNullOrEmpty(model.BeforeMoney))
             {
                 if (string.IsNullOrEmpty(model.MoneyOld))
                 {
                     model.MoneyOld = Convert.ToInt32(model.BeforeMoney) + "";
                 }
                 else
                 {
                     model.MoneyOld = Convert.ToInt32(model.MoneyOld) + Convert.ToInt32(model.BeforeMoney) + "";
                 }
                 model.BeforeMoney = "";
                 db.SaveChanges();
                 db.ExecuteStoreCommand("update InfoLogo set Status={0} where RgId={1}", 3, tmpid);
                 jsHint.toUrl("佣金支付成功", "RegistInfo.aspx?page=" + Request.Params["page"]);
             }
             else
             {
                 jsHint.toUrl("佣金已经支付成功", "RegistInfo.aspx?page=" + Request.Params["page"]);
             }
         }
     }
 }
Example #3
0
 private void QKInfo(HttpContext context)
 {
     using (WXDBEntities db = new WXDBEntities())
     {
         try
         {
             var strsql = "update effect set status=0";
             db.ExecuteStoreCommand(strsql);
             string jsonstrlist = JsonHelper.GetJsonString(new jsonResult {
                 code = "", result = "", count = 1
             });
             context.Response.Write(jsonstrlist);
         }
         catch (Exception)
         {
             string jsonstrlist = JsonHelper.GetJsonString(new jsonResult {
                 code = "", result = "", count = 0
             });
             context.Response.Write(jsonstrlist);
         }
     }
 }