Пример #1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            context.Response.Cache.SetNoStore();
            string txt = "0";

            try
            {
                string   code       = context.Request.QueryString["code"];
                string   activityid = context.Request.QueryString["activityid"];
                DateTime d1         = DateTime.Now;
                DateTime d2         = DateTime.ParseExact(WebBLL.GetActivityPro(code, new Guid(activityid))[0].BUYTIME, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);
                //DateTime d2 = DateTime.Now;
                if (d1.CompareTo(d2) <= 0)
                {
                    TimeSpan d3 = d2.Subtract(d1);
                    txt = "距开始" + d3.Hours.ToString() + "小时" + d3.Minutes.ToString() + "分钟" + d3.Seconds.ToString() + "秒";
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                context.Response.Write(txt);
                context.Response.End();
            }
        }
Пример #2
0
 public void BindDropList()
 {
     productlist.DataSource     = WebBLL.GetAllProduct();
     productlist.DataValueField = "CODE";
     productlist.DataTextField  = "TITLE";
     productlist.DataBind();
 }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         code       = Request.QueryString["procode"];
         type       = Request.QueryString["type"];
         activityid = Request.QueryString["activityid"];
         if (!WebBLL.CheckActivity(code, new Guid(activityid), type))
         {
             GoNoFound();
         }
         Model.ActivityPro activityPro = WebBLL.GetActivityPro(code, new Guid(activityid))[0];
         if (activityPro.DESIMGPATH.Trim() == "")
         {
             Response.Redirect("buy.aspx?procode=" + code + "&type=" + type + "&activityid=" + activityid, false);
         }
         else
         {
             desimgpath = activityPro.DESIMGPATH;
         }
     }
     catch (Exception ex)
     {
         GoNoFound();
     }
 }
Пример #4
0
        public void ProcessRequest(HttpContext context)
        {
            Guid   ID        = new Guid(context.Request.QueryString["ID"]);
            string Logistics = context.Request.QueryString["Logistics"];

            WebBLL.UpdateLogistics(ID, Logistics);
            HttpContext.Current.Response.Write("success");
        }
Пример #5
0
        public void BindDropActivityList()
        {
            List <Model.Activity> list = WebBLL.GetActivityesByType(int.Parse(typeList.SelectedValue));

            activityList.DataSource     = list;
            activityList.DataValueField = "ID";
            activityList.DataTextField  = "NAME";
            activityList.DataBind();
        }
Пример #6
0
        public void ProcessRequest(HttpContext context)
        {
            Guid   activityID = new Guid(context.Request.QueryString["activityID"]);
            string code       = context.Request.QueryString["code"];
            string buytime    = context.Request.QueryString["buytime"] == null ? "" : context.Request.QueryString["buytime"];
            string num        = context.Request.QueryString["num"] == null ? "0" : context.Request.QueryString["num"];
            string imagepath  = context.Request.QueryString["imagepath"] == null ? "" : context.Request.QueryString["imagepath"];
            string desimgpath = context.Request.QueryString["desimgpath"] == null ? "" : context.Request.QueryString["desimgpath"];

            WebBLL.InsertActivityPro(activityID, code, Guid.Empty, buytime, num, imagepath, desimgpath);
            HttpContext.Current.Response.Write("success");
        }
Пример #7
0
        protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            string code = e.CommandArgument.ToString();;

            if (e.CommandName == "Edit")
            {
                Response.Redirect("ConnectEdit.aspx?ID=" + code + "&code=" + codeStr);
            }
            else if (e.CommandName == "Delete")
            {
                WebBLL.DeleteActivityPro(new Guid(code));
                Response.Redirect("ConnectPro.aspx?code=" + codeStr);
            }
        }
Пример #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string codeStr = Request.QueryString["code"];

            if (!IsPostBack)
            {
                List <Model.Activity> list = WebBLL.GetActivity(codeStr);
                if (list.Count != 0)
                {
                    name.Value = list[0].NAME.ToString();
                    code.Value = list[0].CODE.ToString();
                    id.Value   = list[0].ID.ToString();
                }
            }
        }
Пример #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         codeStr = Request.QueryString["code"];
         List <Model.Activity> list = WebBLL.GetActivity(codeStr);
         if (list.Count != 0)
         {
             name.InnerText   = list[0].NAME;
             activityID.Value = list[0].ID.ToString();
             type.Value       = list[0].TYPE.ToString();
             BindGrid(list[0].ID);
             BindDropList();
         }
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            string ID = Request.QueryString["ID"];

            code = Request.QueryString["code"];
            if (!IsPostBack)
            {
                List <Model.ActivityPro> list = WebBLL.GetActivityPro(new Guid(ID));
                if (list.Count != 0)
                {
                    buytime.Value    = list[0].BUYTIME.ToString();
                    num.Value        = list[0].NUM.ToString();
                    imagepath.Value  = list[0].IMAGEPATH.ToString();
                    desimgpath.Value = list[0].DESIMGPATH.ToString();
                    id.Value         = list[0].ID.ToString();
                }
            }
        }
Пример #11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         timeBuyCode = Request.QueryString["timeBuyCode"];
         normalCode  = Request.QueryString["normalCode"];
         pollCode    = Request.QueryString["pollCode"];
         var listTimeBuy = WebBLL.GetActivity(timeBuyCode);
         listTimeBuyPro = GetActivityPro(listTimeBuy[0].ID);
         var listNormal = WebBLL.GetActivity(normalCode);
         listNormalPro = GetActivityPro(listNormal[0].ID);
         var listPoll = WebBLL.GetActivity(pollCode);
         listPollPro = GetActivityPro(listPoll[0].ID);
     }
     catch (Exception)
     {
         GoNoFound();
     }
 }
Пример #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.Form["notifyData"] != null)
     {
         try
         {
             ICBC icbcInfo = new ICBC();
             icbcInfo.TranData   = Request.Form["notifyData"];
             icbcInfo.MerSignMsg = Request.Form["signMsg"].ToString();
             icbcInfo            = CBCPayOnline.GetCheckReturnInfo(icbcInfo);
             //自定义返回的变量
             //string myOrderid = Encrypt.Decode(Request.Form["merVAR"].ToString());
             if (icbcInfo.IsCheck)
             {
                 DataSet      myds      = new DataSet();
                 StringReader strReader = new StringReader(icbcInfo.TranData);
                 myds.ReadXml(strReader);
                 FileStream   fs = new FileStream("D:\\cc.txt", FileMode.Append);
                 StreamWriter sw = new StreamWriter(fs, Encoding.Default);
                 sw.Write(ToJson(myds));
                 sw.Close();
                 fs.Close();
                 DataTable mytable = new DataTable();
                 mytable = myds.Tables["bank"];
                 string payDate = myds.Tables["orderInfo"].Rows[0]["orderDate"].ToString().Trim();
                 string userNum = myds.Tables["custom"].Rows[0]["UserNum"].ToString().Trim();//联名客户在商户的会员号
                 userNum += "," + myds.Tables["bank"].Rows[0]["TranBatchNo"].ToString().Trim();
                 string amount  = myds.Tables["orderInfo"].Rows[0]["amount"].ToString().Trim();
                 string orderid = myds.Tables["orderInfo"].Rows[0]["orderid"].ToString().Trim();
                 if (null != mytable && mytable.Rows.Count > 0)
                 {
                     if (mytable.Rows[0]["tranStat"].ToString().Trim() == "1")
                     {
                         WebBLL.UpdatePayOrder(true, true, orderid, payDate, userNum, amount);
                     }
                 }
             }
         }
         catch (Exception ex)
         {
         }
     }
 }
Пример #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string codeStr = Request.QueryString["code"];

            if (!IsPostBack)
            {
                List <Model.BestCherryInfo> list = WebBLL.GetCherry(codeStr);
                if (list.Count != 0)
                {
                    name.Value        = list[0].TITLE.ToString();
                    color.Value       = list[0].COLOR.ToString();
                    price.Value       = list[0].PRICE.ToString();
                    memberprice.Value = list[0].MEMBERPRICE.ToString();
                    imgpath.Value     = list[0].IMAGEPATH.ToString();
                    smalltitle.Value  = list[0].SMALLTITLE.ToString();
                    code.Value        = list[0].CODE.ToString();
                    id.Value          = list[0].ID.ToString();
                }
            }
        }
Пример #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         code       = Request.QueryString["procode"];
         type       = Request.QueryString["type"];
         activityid = Request.QueryString["activityid"];
         if (!WebBLL.CheckActivity(code, new Guid(activityid), type))
         {
             GoNoFound();
         }
         if (type == "1")
         {
             dt = WebBLL.GetCherry(code);
             int num = WebBLL.GetSuccessOrderInfoListByCode(code);
             sum   = int.Parse(WebBLL.GetActivityPro(code, new Guid(activityid))[0].NUM.ToString());
             count = sum - num;
             if (count < 0)
             {
                 count = 0;
             }
         }
         else if (type == "2")
         {
             dt = WebBLL.GetNormalCherry(new Guid(activityid));
         }
         else
         {
             GoNoFound();
         }
         if (dt.Count == 0)
         {
             GoNoFound();
         }
     }
     catch (Exception)
     {
         GoNoFound();
     }
 }
Пример #15
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            context.Response.Cache.SetNoStore();
            int non = 0;

            try
            {
                string ID = context.Request.QueryString["ID"];
                WebBLL.UpdatePoll(new Guid(ID));
                non = 1;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                context.Response.Write(non);
                context.Response.End();
            }
        }
Пример #16
0
        protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            string code = e.CommandArgument.ToString();;

            if (e.CommandName == "Edit")
            {
                Response.Redirect("TimeEdit.aspx?code=" + code);
            }
            else if (e.CommandName == "Delete")
            {
                if (WebBLL.DelActivity(new Guid(code)) == true)
                {
                    ShowAlert("删除成功");
                }
                else
                {
                    ShowAlert("删除失败");
                }
                BindGrid();
            }
            else if (e.CommandName == "Connect")
            {
                Response.Redirect("ConnectPro.aspx?code=" + code);
            }
            else if (e.CommandName == "Reset")
            {
                if (WebBLL.ResetActivity(new Guid(code)) == true)
                {
                    ShowAlert("重置成功");
                }
                else
                {
                    ShowAlert("重置失败");
                }
            }
        }
Пример #17
0
 public void Save_click(object sender, EventArgs e)
 {
     WebBLL.UpdateICBCCherryInfo(new Guid(id.Value), name.Value, color.Value, price.Value, memberprice.Value, imgpath.Value, smalltitle.Value, code.Value, "");
     Response.Redirect("ProductList.aspx");
 }
 public void BindGrid()
 {
     rptList.DataSource = WebBLL.GetCherryByName(namelike.Value);
     rptList.DataBind();
 }
Пример #19
0
        public void Export_click(object sender, EventArgs e)
        {
            NPOIHelper.ListColumnsName = new SortedList(new NoSort());
            NPOIHelper.ListColumnsName.Add("ID", "导入物流凭证请勿修改");
            NPOIHelper.ListColumnsName.Add("CONSIGNEE", "姓名");
            NPOIHelper.ListColumnsName.Add("MOBILE", "手机号");
            NPOIHelper.ListColumnsName.Add("ALLADDRESS", "地址");
            NPOIHelper.ListColumnsName.Add("ORDERLIST", "订单内容");
            NPOIHelper.ListColumnsName.Add("PAYDATE", "付款时间");
            NPOIHelper.ListColumnsName.Add("AMOUNT", "付款金额");
            NPOIHelper.ListColumnsName.Add("REMARK", "送货备注");
            NPOIHelper.ListColumnsName.Add("LOGISTICS", "物流号");
            Response.Clear();
            Response.BufferOutput    = false;
            Response.ContentEncoding = System.Text.Encoding.UTF8;
            string filename = typeList.SelectedItem.Text + "-" + activityList.SelectedItem.Text + "-" + time.Value + "已付款订单列表";

            Response.AddHeader("Content-Disposition", "attachment;filename=" + filename + ".xls");
            Response.ContentType = "application/ms-excel";
            NPOIHelper.ExportExcel(Common.ToDataTable <Model.OrderInfo>(Common.GetAllAdress(WebBLL.GetOrderInfoListByName(namelike.Value, new Guid(activityList.SelectedValue.ToString()), true, time.Value.Replace("-", "")))), Response.OutputStream);
            Response.Close();
        }
Пример #20
0
 public void Save_click(object sender, EventArgs e)
 {
     WebBLL.InsertActivity(name.Value, "1", code.Value);
     Response.Redirect("TimeBuy.aspx");
 }
Пример #21
0
 public void Save_click(object sender, EventArgs e)
 {
     WebBLL.UpdateActivity(new Guid(id.Value), name.Value, "3", code.Value);
     Response.Redirect("Poll.aspx");
 }
Пример #22
0
 public void BindGrid()
 {
     rptList.DataSource = WebBLL.GetOrderInfoListByName(namelike.Value, new Guid(activityList.SelectedValue.ToString()), true, time.Value.Replace("-", ""));
     rptList.DataBind();
 }
Пример #23
0
 public void BindGrid()
 {
     rptList.DataSource = WebBLL.GetActivityByName(namelike.Value, 1);
     rptList.DataBind();
 }
 public void Save_click(object sender, EventArgs e)
 {
     WebBLL.UpdateActivityPro(new Guid(id.Value), buytime.Value, num.Value, imagepath.Value, desimgpath.Value);
     Response.Redirect("ConnectPro.aspx?code=" + code);
 }
Пример #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //生成订单号
            string orderId  = Common.GetUniqueSerial();
            int    allPrice = 0; //总价
            int    allNum   = 0; //商品总数

            string consignee         = Request.Form["consignee"].ToString();
            string membernum         = Request.Form["membernum"].ToString();
            string mobile            = Request.Form["mobile"].ToString();
            string receiver_state    = Request.Form["receiver_state"].ToString();
            string receiver_city     = Request.Form["receiver_city"].ToString();
            string receiver_district = Request.Form["receiver_district"].ToString();
            string address           = Request.Form["address"].ToString();
            string remark            = Request.Form["remark"].ToString();
            string typeactivityid    = Common.Decode(Request.Form["typeactivityid"].ToString());
            string type       = typeactivityid.Split(',')[0];
            string activityid = typeactivityid.Split(',')[1];
            string orderlist  = Request.Form["orderbuy"].ToString();//商品列表  格式为 编号,数量

            string[] orderarray = orderlist.Split(',');
            //计算总金额
            for (int i = 0; i < orderarray.Length; i += 2)
            {
                if (type == "1")
                {
                    if (!WebBLL.CheckActivity(orderarray[i].ToString(), new Guid(activityid), type))
                    {
                        GoNoFound();
                    }
                    int buytime = WebBLL.GetSuccessOrderInfoListByMobile(mobile);
                    if (buytime > 0)
                    {
                        GoNoFound("活动期间每人只能参与一次抢购,如果您抢购的订单未完成支付而退出,请期待下个时间段抢购,谢谢!");
                    }
                    int count = 0;
                    int num   = WebBLL.GetSuccessOrderInfoListByCode(orderarray[i].ToString());
                    List <Model.BestCherryInfo> dt = WebBLL.GetCherry(orderarray[i].ToString());
                    int sum = int.Parse(WebBLL.GetActivityPro(orderarray[i].ToString(), new Guid(activityid))[0].NUM.ToString());
                    count = sum - num;
                    if (count < 0)
                    {
                        count = 0;
                    }
                    if (count == 0)
                    {
                        GoNoFound("商品已被抢光了.....");
                    }
                    DateTime d1 = DateTime.Now;
                    DateTime d2 = DateTime.ParseExact(WebBLL.GetActivityPro(orderarray[i].ToString(), new Guid(activityid))[0].BUYTIME, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);
                    if (d1.CompareTo(d2) <= 0)
                    {
                        GoNoFound("时间还没到呢!!.....");
                    }
                }
                int price      = 0;
                int membertemp = 0;
                Model.BestCherryInfo bestCherryInfo = WebBLL.GetCherry(orderarray[i].ToString())[0];
                if (int.TryParse(membernum, out membertemp))
                {
                    price = (int)bestCherryInfo.MEMBERPRICE;
                }
                else
                {
                    if (type == "1")
                    {
                        price = (int)bestCherryInfo.MEMBERPRICE;
                        name  = bestCherryInfo.TITLE;
                    }
                    else
                    {
                        price = (int)bestCherryInfo.PRICE;
                        name  = bestCherryInfo.TITLE;
                    }
                }
                allPrice += price * int.Parse(orderarray[i + 1]);
                allNum   += 1;
            }
            if (type == "2")
            {
                if (allPrice < 88)
                {
                    allPrice += 10;
                }
                name = name + "等..";
            }
            //将信息保存到数据库
            if (!WebBLL.InsertOrder(consignee, membernum, mobile, receiver_state, receiver_city, receiver_district, address, orderlist, orderId, allPrice.ToString(), int.Parse(type), new Guid(activityid), remark))
            {
                GoNoFound("与数据库失去了连接,请稍后再试.....");
            }
            //GoMOBILEICBC(orderId, allNum.ToString(), allPrice.ToString());
        }
Пример #26
0
 public void BindGrid()
 {
     rptList.DataSource = WebBLL.GetOrderInfoListByNameOrderByNotPrinted(namelike.Value, new Guid(activityList.SelectedValue.ToString()), true, check.Checked);
     rptList.DataBind();
 }
Пример #27
0
 public void BindGrid()
 {
     rptList.DataSource = WebBLL.GetOrderInfoListByName(namelike.Value, new Guid(activityList.SelectedValue.ToString()), false);
     rptList.DataBind();
 }
Пример #28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     notPay  = WebBLL.GetOrderInfoNotPay();
     havePay = WebBLL.GetOrderInfoHavePay();
 }