Ejemplo n.º 1
0
    /// <summary>
    /// 获取餐饮当前用户当前订单条数
    /// </summary>
    /// <returns></returns>
    public static int getItemCount()
    {
        V_WEC_CY_ITEM conf2 = new V_WEC_CY_ITEM();

        conf2.F_ID     = userid;
        conf2.O_ID     = 0;
        conf2.STORE_ID = CYUtil.getStoreId();
        List <V_WEC_CY_ITEM> list = BLLTable <V_WEC_CY_ITEM> .Factory("conn_canyin").Select(new V_WEC_CY_ITEM(), conf2);

        return(list.Count);
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie cookie  = Request.Cookies["currStore"];
        int        storeId = Convert.ToInt32(cookie.Values["currStoreId"]);

        WEC_CY_TYPE conf2 = new WEC_CY_TYPE();

        conf2.STORE_ID = storeId;
        typeList       = BLLTable <WEC_CY_TYPE> .Factory("conn_canyin").Select(new WEC_CY_TYPE(), conf2);

        WEC_CY_DISH conf = new WEC_CY_DISH();

        conf.TYPE_ID  = typeList[0].ID;
        conf.STORE_ID = storeId;
        dishList      = BLLTable <WEC_CY_DISH> .Factory("conn_canyin").Select(new WEC_CY_DISH(), conf);

        num = CYUtil.getItemCount();
    }
Ejemplo n.º 3
0
    /// <summary>
    /// 获取当前用户当前订单条目的价格总和
    /// </summary>
    /// <returns></returns>
    public static decimal getItemsPrice()
    {
        V_WEC_CY_ITEM conf2 = new V_WEC_CY_ITEM();

        conf2.F_ID     = userid;
        conf2.O_ID     = 0;
        conf2.STORE_ID = CYUtil.getStoreId();
        List <V_WEC_CY_ITEM> list = BLLTable <V_WEC_CY_ITEM> .Factory("conn_canyin").Select(new V_WEC_CY_ITEM(), conf2);

        StringBuilder sb    = new StringBuilder();
        decimal       total = 0;

        foreach (V_WEC_CY_ITEM item in list)
        {
            decimal price = item.SPECIAL_PRICE == 0 ? item.DISH_PRICE : item.SPECIAL_PRICE;
            total += price * item.NUM;
        }
        return(total);
    }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int storeid = Convert.ToInt32(Request["storeid"]);
        //  CYUtil.setStoreId(storeid);

        WEC_CY_STOREMANAGER conf2     = new WEC_CY_STOREMANAGER();
        WEC_CY_STOREMANAGER currStore = BLLTable <WEC_CY_STOREMANAGER> .GetRowData(conf2);

        HttpCookie cookie = new HttpCookie("currStore");

        cookie.Values.Add("currStoreId", "" + storeid);
        cookie.Values.Add("currStoreAddress", HttpUtility.UrlEncode("" + currStore.ADDRESS));
        cookie.Values.Add("currStoreTel", "" + currStore.TEL);
        //HttpCookie cookie2 = new HttpCookie("currStoreAddress", "" +currStore.ADDRESS );
        //HttpCookie cookie3 = new HttpCookie("currStoreTel", "" + currStore.TEL);
        DateTime dt = DateTime.Now;
        TimeSpan ts = new TimeSpan(1, 0, 0, 0);

        cookie.Expires = dt.Add(ts);
        Response.AppendCookie(cookie);
        //HttpCookie C= Request.Cookies[""];

        WEC_CY_SELECTDISH conf = new WEC_CY_SELECTDISH();

        conf.OrderBy(WEC_CY_SELECTDISH.Attribute.ORDER_DISPLAY);
        conf.STORE_ID = storeid;
        list          = BLLTable <WEC_CY_SELECTDISH> .Factory("conn_canyin").Select(new WEC_CY_SELECTDISH(), conf);

        //BLLTable.SQL_Test.ToString();

        foreach (WEC_CY_SELECTDISH s in list)
        {
            nums.Append("," + s.FIT_NUM);
        }
        if (nums.Length > 0)
        {
            nums.Remove(0, 1);
        }

        num = CYUtil.getItemCount();
    }
Ejemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     num = CYUtil.getItemCount();
 }