public void List(string id)
        {
            DataSet dr = manage.Getcaopin(id);

            if (dr.Tables[0].Rows.Count > 0)
            {
                decimal amount = 0;



                Dingdanlist += "<tr><th>菜品名称</th><th class=\"cc\">单价</th><th class=\"cc\">购买份数</th><th class=\"rr\">价格</th> </tr>";
                for (int i = 0; i < dr.Tables[0].Rows.Count; i++)
                {
                    Dingdanlist += " <tr><td>" + dr.Tables[0].Rows[i]["cpName"] + "</td>";
                    Dingdanlist += "<td class=\"cc\">" + dr.Tables[0].Rows[i]["price"] + "</td>";
                    Dingdanlist += "<td class=\"cc\">" + dr.Tables[0].Rows[i]["num"] + "</td>";
                    Dingdanlist += "<td class=\"rr\">¥" + dr.Tables[0].Rows[i]["totpric"] + "</td></tr>";
                    amount      += Convert.ToDecimal(dr.Tables[0].Rows[i]["totpric"]);
                }
                decimal zongji = amount + Convert.ToDecimal(sjopmodel.sendCost);
                Dingdanlist += "<tr><td>总计:</td><td ></td><td ></td><td class=\"rr\">¥" + zongji + "</td></tr>";
            }

            managemodel = manage.GetModeldingdan(id);
            //订单信息
            if (managemodel != null)
            {
                //05月22日 14时01分
                dingdandatail += "<li class=\"title\"><span class=\"none\">" + managemodel.oderTime + "订单详情";
                if (managemodel.payStatus.ToString() == "1")
                {
                    dingdandatail += "<em  style='width:70px;' class='ok'>成功</em></span></li>";
                }
                else
                {
                    dingdandatail += "<em  style='width:70px;' class='no'>未处理</em></span></li>";
                }
                dingdandatail += "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"cpbiaoge\">";

                dingdandatail += " <tr> <td>联系人 : " + managemodel.customerName + "</td></tr>";
                dingdandatail += " <tr> <td>联系电话 : " + managemodel.customerTel + "</td></tr>";
                dingdandatail += " <tr> <td>地址 : " + managemodel.address + "</td></tr>";
                dingdandatail += "<tr><td>备注 : " + managemodel.oderRemark + "</td></tr>";
                dingdandatail += "<td>预订时间:" + managemodel.oderTime + "</td></tr>";//2014年05月22日 14时01分
                dingdandatail += "<tr><td valign=\"top\">备注信息:" + managemodel.oderRemark + "</td></tr>";
                dingdandatail += "  </table>";
            }
        }
Esempio n. 2
0
        public void List(int ids)
        {
            //订单

            Dingdanlist = "";
            dingdanren  = "";

            DataSet dr = managebll.Getcaopin(id);

            if (dr.Tables[0].Rows.Count > 0)
            {
                decimal amount = 0;



                Dingdanlist += "<tr><th>菜品名称</th><th class=\"cc\">单价</th><th class=\"cc\">购买份数</th><th class=\"rr\">价格</th> </tr>";
                for (int i = 0; i < dr.Tables[0].Rows.Count; i++)
                {
                    Dingdanlist += " <tr><td>" + dr.Tables[0].Rows[i]["cpName"] + "</td>";
                    Dingdanlist += "<td class=\"cc\">" + dr.Tables[0].Rows[i]["price"] + "</td>";
                    Dingdanlist += "<td class=\"cc\">" + dr.Tables[0].Rows[i]["num"] + "</td>";
                    Dingdanlist += "<td class=\"rr\">¥" + dr.Tables[0].Rows[i]["totpric"] + "</td></tr>";
                    amount      += Convert.ToDecimal(dr.Tables[0].Rows[i]["totpric"]);
                }

                sjopmodel = shopinfo.GetModel(shopid);//配送费
                decimal zongji = amount + Convert.ToDecimal(sjopmodel.sendCost);
                if (sjopmodel != null)
                {
                    Dingdanlist += "<tr><td>商品总费</td><td class=\"cc\">¥" + amount + "</td>  <td class=\"cc\" >配送费</td><td class=\"rr\" >¥" + sjopmodel.sendCost + "</td></tr>";
                }
                else
                {
                    Dingdanlist += "<tr><td>商品总费</td><td class=\"cc\">¥" + amount + "</td>  <td class=\"cc\" >配送费</td><td class=\"rr\" >¥" + 0 + "</td></tr>";
                }
                Dingdanlist += "<tr><td>总计:</td><td ></td><td ></td><td class=\"rr\">¥" + zongji + "</td></tr>";
            }


            manage = managebll.GetModeldingdan(id);
            //订单信息
            if (manage != null)
            {
                dingdanren += "<tr><td width=\"70\">订单编号: " + manage.orderNumber + "</td></tr>";
                dingdanren += "<tr> <td>下单时间:" + manage.oderTime + "</td></tr>";
                dingdanren += "<tr><td>联系人:" + manage.customerName + "</td></tr>";
                dingdanren += "<tr><td>联系电话:" + manage.customerTel + "</td></tr>";
                dingdanren += "<tr><td>地址:" + manage.address + "</td></tr>";
                dingdanren += "<tr><td>备注 :" + manage.oderRemark + "</td></tr>";
                if (manage.payStatus == 1)
                {
                    dingdanren += "<tr><td>订单状态:<em  style='width:70px;' class='ok'>已处理</em></td></tr>";
                }
                else
                {
                    dingdanren += "<tr><td>订单状态:<em  style='width:70px;' class='no'>未处理</em></td></tr>";
                }
            }
            else
            {
                dingdanren += "<tr><td width=\"70\">订单编号:</td></tr>";
                dingdanren += "<tr> <td>下单时间:</td></tr>";
                dingdanren += "<tr><td>联系人:</td></tr>";
                dingdanren += "<tr><td>联系电话:</td></tr>";
                dingdanren += "<tr><td>地址:</td></tr>";
                dingdanren += "<tr><td>备注 :</td></tr>";


                dingdanren += "<tr><td>订单状态:<em  style='width:70px;' class='no'>未处理</em></td></tr>";
            }


            dingdanren += "<tr><td>商家留言:</td></tr> <tr> <td></td></tr>";
        }
Esempio n. 3
0
        public void List(int ids)
        {
            //订单
            Dingdanlist = "";
            dingdanren  = "";

            DataSet dr = managebll.Getcommodity(cid);

            if (dr.Tables[0].Rows.Count > 0)
            {
                decimal amount = 0;

                if (dr.Tables[0].Rows[0]["status"].ToString() == "2")
                {
                    save_groupbase.Text        = "已验证";
                    save_groupbase.Enabled     = false;
                    save_groupbase.Style.Value = "";
                }
                Dingdanlist += "<tr><th>套餐名称</th><th class=\"cc\">购买份数</th><th class=\"cc\">单价</th><th class=\"rr\">总价</th> </tr>";
                for (int i = 0; i < dr.Tables[0].Rows.Count; i++)
                {
                    Dingdanlist += " <tr><td  class=\"cc\">" + dr.Tables[0].Rows[i]["cpName"] + "</td>";
                    Dingdanlist += "<td class=\"cc\">" + 1 + "</td>";
                    Dingdanlist += "<td class=\"cc\">" + dr.Tables[0].Rows[i]["price"] + "</td>";
                    Dingdanlist += "<td class=\"rr\">¥" + dr.Tables[0].Rows[i]["price"] + "</td></tr>";
                    amount      += Convert.ToDecimal(dr.Tables[0].Rows[i]["price"]);
                }

                Dingdanlist += "<tr><td></td><td ></td><td ></td><td class=\"rr\" style=\"color: red; font-weight:bold;\">总计:¥" + amount + "</td></tr>";
            }

            manage = managebll.GetModeldingdan(id);
            //获取菜品有效期
            string caipinRange   = string.Empty;
            bool   isInRange     = true;
            var    caipinManager = new BLL.wx_diancai_caipin_manage().GetModel(ids);

            if (caipinManager != null)
            {
                if (caipinManager.beginDate != null && caipinManager.endDate != null)
                {
                    caipinRange = string.Format("{0}至{1}", caipinManager.beginDate.Value.ToString("yyyy-MM-dd"), caipinManager.endDate.Value.ToString("yyyy-MM-dd"));
                    if (manage.createDate > caipinManager.endDate.Value)
                    {
                        isInRange = false;
                    }
                }
            }

            //订单信息
            if (manage != null)
            {
                dingdanren += "<tr><td width=\"70\">订单编号: " + manage.orderNumber + "</td></tr>";
                dingdanren += "<tr> <td>预订日期:" + manage.oderTime + "</td></tr>";

                if (!string.IsNullOrEmpty(caipinRange))
                {
                    dingdanren += "<tr> <td>订单有效期:" + caipinRange + "</td></tr>";
                }

                dingdanren += "<tr><td>预约人:" + manage.customerName + "</td></tr>";
                dingdanren += "<tr><td>电话:" + manage.customerTel + "</td></tr>";
                //dingdanren += "<tr><td>地址:" + manage.address + "</td></tr>";
                //dingdanren += "<tr><td>备注 :" + manage.oderRemark + "</td></tr>";
                if (manage.payStatus == StatusManager.PayStatus.Payed.StatusID)
                {
                    dingdanren += "<tr><td>订单状态:<em  style='width:70px;' class='ok'>等待使用</em></td></tr>";
                }
                else if (manage.payStatus == StatusManager.PayStatus.PartUsed.StatusID)
                {
                    dingdanren += "<tr><td>订单状态:<em  style='width:70px;' class='ok'>部分使用</em></td></tr>";
                }
                else if (manage.payStatus == StatusManager.PayStatus.PartRefund.StatusID)
                {
                    dingdanren += "<tr><td>订单状态:<em  style='width:70px;' class='ok'>部分退款</em></td></tr>";
                }
                else
                {
                    dingdanren += "<tr><td>订单状态:<em  style='width:70px;' class='no'>未使用</em></td></tr>";
                }

                //如果订单已经过期,提醒管理员
                if (!isInRange)
                {
                    dingdanren += "<tr><td>订单状态:<em  style='width:70px;font-size:1.3em' class='error'>当前订单已经过期</em></td></tr>";
                }
            }
            else
            {
                dingdanren += "<tr><td width=\"70\">订单编号:</td></tr>";
                dingdanren += "<tr> <td>预订日期:</td></tr>";
                dingdanren += "<tr><td>预约人:</td></tr>";
                dingdanren += "<tr><td>电话:</td></tr>";
                //dingdanren += "<tr><td>地址:</td></tr>";
                //dingdanren += "<tr><td>备注 :</td></tr>";

                dingdanren += "<tr><td>订单状态:<em  style='width:70px;' class='no'>未使用</em></td></tr>";
            }
        }
Esempio n. 4
0
        public void List(string dingdan)
        {
            //订单
            Dingdanlist = "";
            dingdanren  = "";

            DataSet dr = manage.Getcaopin(dingdan);

            if (dr.Tables[0].Rows.Count > 0)
            {
                decimal amount = 0;



                Dingdanlist += "<tr><th>菜品名称</th><th class=\"cc\">单价</th><th class=\"cc\">购买份数</th><th class=\"rr\">价格</th> </tr>";
                for (int i = 0; i < dr.Tables[0].Rows.Count; i++)
                {
                    Dingdanlist += " <tr><td>" + dr.Tables[0].Rows[i]["cpName"] + "</td>";
                    Dingdanlist += "<td class=\"cc\">" + dr.Tables[0].Rows[i]["price"] + "</td>";
                    Dingdanlist += "<td class=\"cc\">" + dr.Tables[0].Rows[i]["num"] + "</td>";
                    Dingdanlist += "<td class=\"rr\">¥" + dr.Tables[0].Rows[i]["totpric"] + "</td></tr>";
                    amount      += Convert.ToDecimal(dr.Tables[0].Rows[i]["totpric"]);
                }
                decimal zongji = amount;

                //订单满多少免配送费

                decimal psf = 0;
                if (amount < sjopmodel.freeSendcost)
                {
                    zongji += Convert.ToDecimal(sjopmodel.sendCost);

                    psf = sjopmodel.sendCost.Value;
                }



                Dingdanlist += "<tr><td>商品总费</td><td class=\"cc\">¥" + amount + "</td>  <td class=\"cc\" >配送费</td><td class=\"rr\" >¥" + psf + "</td></tr>";
                Dingdanlist += "<tr><td>总计:</td><td ></td><td ></td><td class=\"rr\">¥" + zongji + "</td></tr>";
            }


            managemodel = manage.GetModeldingdan(dingdan);
            //订单信息
            if (managemodel != null)
            {
                dingdanren += "<tr><td width=\"70\">订单编号: " + managemodel.orderNumber + "</td></tr>";
                dingdanren += "<tr> <td>下单时间:" + managemodel.oderTime + "</td></tr>";
                dingdanren += "<tr><td>联系人:" + managemodel.customerName + "</td></tr>";
                dingdanren += "<tr><td>联系电话:" + managemodel.customerTel + "</td></tr>";
                dingdanren += "<tr><td>地址:" + managemodel.address + "</td></tr>";
                dingdanren += "<tr><td>备注 :" + managemodel.oderRemark + "</td></tr>";
                if (managemodel.payStatus == 1)
                {
                    dingdanren += "<tr><td>订单状态:<em  style='width:70px;' class='ok'>成功</em></td></tr>";
                    showcard.Style.Add("display", "none");
                    showcard2.Style.Add("display", "");
                    showcard.HRef = "#";
                }
                else if (managemodel.payStatus == 2)
                {
                    dingdanren   += "<tr><td>订单状态:<em  style='width:70px;' class='error'>失败</em></td></tr>";
                    showcard.HRef = "diancai_dingdan.aspx?dingdan=" + dingdan + "&type=delete&shopid=" + shopid + "&openid=" + openid;
                }
                else
                {
                    dingdanren   += "<tr><td>订单状态:<em  style='width:70px;' class='no'>未处理</em></td></tr>";
                    showcard.HRef = "diancai_dingdan.aspx?dingdan=" + dingdan + "&type=delete&shopid=" + shopid + "&openid=" + openid;
                }
            }
            else
            {
                dingdanren += "<tr><td width=\"70\">订单编号:</td></tr>";
                dingdanren += "<tr> <td>下单时间:</td></tr>";
                dingdanren += "<tr><td>联系人:</td></tr>";
                dingdanren += "<tr><td>联系电话:</td></tr>";
                dingdanren += "<tr><td>地址:</td></tr>";
                dingdanren += "<tr><td>备注 :</td></tr>";


                dingdanren += "<tr><td>订单状态:<em  style='width:70px;' class='no'>未处理</em></td></tr>";
            }


            dingdanren += "<tr><td>商家留言:</td></tr> <tr> <td></td></tr>";
        }
Esempio n. 5
0
        public void List(int ids)
        {
            //订单

            StringBuilder dingdanlistStringBuilder = new StringBuilder();
            StringBuilder dingdanrenStringBuilder  = new StringBuilder();

            DataSet dr = managebll.Getcaopin(id);

            if (dr.Tables[0].Rows.Count > 0)
            {
                decimal amount = 0;

                dingdanlistStringBuilder.Append("<tr><th>商品信息名称</th><th class=\"cc\">单价</th><th class=\"cc\">购买份数</th><th class=\"rr\">总价</th> </tr>");
                for (int i = 0; i < dr.Tables[0].Rows.Count; i++)
                {
                    dingdanlistStringBuilder.Append(" <tr><td>" + dr.Tables[0].Rows[i]["cpName"] + "</td>");
                    dingdanlistStringBuilder.Append("<td class=\"cc\">¥" + dr.Tables[0].Rows[i]["price"] + "</td>");
                    dingdanlistStringBuilder.Append("<td class=\"cc\">" + dr.Tables[0].Rows[i]["num"] + "</td>");
                    dingdanlistStringBuilder.Append("<td class=\"rr\">¥" + dr.Tables[0].Rows[i]["totpric"] + "</td></tr>");
                    amount += Convert.ToDecimal(dr.Tables[0].Rows[i]["totpric"]);
                }

                sjopmodel = shopinfo.GetModel(shopid);//配送费
                decimal zongji = amount + Convert.ToDecimal(sjopmodel.sendCost);
                if (sjopmodel != null)
                {
                    dingdanlistStringBuilder.Append("<tr><td>商品总费</td><td class=\"cc\">¥" + amount + "</td>  <td class=\"cc\" ></td><td class=\"rr\" ></td></tr>");
                }
                else
                {
                    dingdanlistStringBuilder.Append("<tr><td>商品总费</td><td class=\"cc\">¥" + amount + "</td>  <td class=\"cc\" ></td><td class=\"rr\" ></td></tr>");
                }
                dingdanlistStringBuilder.Append("<tr><td></td><td ></td><td ></td><td class=\"rr\">总计:<span class='text-danger'>¥" + zongji + "</span></td></tr>");
            }


            manage = managebll.GetModeldingdan(id);
            //订单信息
            if (manage != null)
            {
                dingdanrenStringBuilder.Append("<tr><td width=\"70\">订单编号: " + manage.orderNumber + "</td></tr>");
                dingdanrenStringBuilder.Append("<tr> <td>预约日期:" + manage.oderTime + "</td></tr>");
                dingdanrenStringBuilder.Append("<tr><td>预约人:" + manage.customerName + "</td></tr>");
                dingdanrenStringBuilder.Append("<tr><td>电话:" + manage.customerTel + "</td></tr>");

                switch (manage.payStatus)
                {
                case 1:
                    dingdanrenStringBuilder.Append("<tr><td>订单状态:<em  style='width:70px;' class='ok'>等待使用</em></td></tr>");
                    break;

                case 2:
                case 4:     //部分退款
                    dingdanrenStringBuilder.Append("<tr><td>订单状态:<em  style='width:70px;' class='ok'>部分使用</em></td></tr>");
                    break;

                case 3:
                case 5:    //全部退款
                    dingdanrenStringBuilder.Append("<tr><td>订单状态:<em  style='width:70px;' class='ok'>全部使用</em></td></tr>");
                    this.btnFinish.Visible = false;
                    break;

                default:
                    dingdanrenStringBuilder.Append("<tr><td>订单状态:<em  style='width:70px;' class='no'>未处理</em></td></tr>");
                    break;
                }

                //判断订单是否完成
                this.btnFinish.Visible = !manage.IsFinish;
            }
            else
            {
                dingdanrenStringBuilder.Append("<tr><td width=\"70\">订单编号:</td></tr>");
                dingdanrenStringBuilder.Append("<tr> <td>下单时间:</td></tr>");
                dingdanrenStringBuilder.Append("<tr><td>联系人:</td></tr>");
                dingdanrenStringBuilder.Append("<tr><td>联系电话:</td></tr>");
                dingdanrenStringBuilder.Append("<tr><td>地址:</td></tr>");
                dingdanrenStringBuilder.Append("<tr><td>备注 :</td></tr>");

                dingdanrenStringBuilder.Append("<tr><td>订单状态:<em  style='width:70px;' class='no'>未处理</em></td></tr>");

                this.btnFinish.Visible = false;
            }

            Dingdanlist = dingdanlistStringBuilder.ToString();
            dingdanren  = dingdanrenStringBuilder.ToString();
        }