//捆绑搜索订单 protected void bindOrder(int page) { string where = getWhere(); SqlHelper sp = LocalSqlHelper.WH; int count = 0; DataTable dt = sp.TablesPageNew("TB_GoodsReturnOrder", "*", "id desc", true, Pager.PageSize, page, where, out count); OrderList.DataShow(dt); Pager.RecordCount = count; Pager.UrlRewritePattern = "GoodsReturnOrder.aspx?page={0}&" + queryStr; }
protected void BindOrderList() { int count = 0; string sql = "select * from Direct_OrderMain where shopxpacid=@shopxpacid and warehouse_id=@warehouse_id"; SqlHelper conn = LocalSqlHelper.WH; conn.Params.Add("@shopxpacid", shopxpacid); conn.Params.Add("@warehouse_id", my_warehouse_id); DataTable dt = conn.ExecDataTable(sql); OrderList.DataShow(dt); }
//捆绑搜索订单 protected void bindOrder(int page) { string where = getWhere(); if (isSearch == 0) { return; } string strTable = "Direct_OrderMain"; SqlHelper sp = LocalSqlHelper.WH; int count = 0; DataTable dt = sp.TablesPageNew(strTable, "*", "fhsj desc", true, Pager.PageSize, page, where, out count); OrderList.DataShow(dt); Pager.RecordCount = count; Pager.UrlRewritePattern = "GoodsReturnAdd.aspx?page={0}&" + queryStr; }
protected void BindOrderList(int index) { int count = 0; string where = getWhere(); SqlHelper conn = LocalSqlHelper.WH; string sql = "select convert(varchar(10),Add_time,120) as thisdate,allCount=count(*) from Tb_User where " + where + " group by convert(varchar(10),Add_time,120) order by convert(varchar(10),Add_time,120)"; // Response.Write(sql); DataTable dt = conn.ExecDataTable(sql); for (int i = 0; i < dt.Rows.Count; i++) { total_allCount += Convert.ToDouble(dt.Rows[i]["allCount"]); } OrderList.DataShow(dt); }
protected void BindOrderList(int index) { int count = 0; string where = getWhere(); SqlHelper conn = LocalSqlHelper.WH; SqlHelper helper = LocalSqlHelper.WH; string sql = "select convert(varchar(10),b.fksj,120) as thisdate,allCount=count(*),sum(b.order_amount) as all_amount,0.00 as goods_amount,0 as goods_nums from Direct_OrderMain b where " + where + " group by convert(varchar(10),b.fksj,120)"; DataTable dt = conn.ExecDataTable(sql); for (int i = 0; i < dt.Rows.Count; i++) { helper.Params.Clear(); DataTable dt_new = helper.ExecDataTable("select isnull(sum(danjia*productcount),0) as goods_amount,isnull(sum(productcount),0) as goods_nums from Direct_OrderDetail where dingdan in (select dingdan from Direct_OrderMain b where " + where + ")"); dt.Rows[i]["goods_amount"] = dt_new.Rows[0]["goods_amount"]; dt.Rows[i]["goods_nums"] = dt_new.Rows[0]["goods_nums"]; total_allCount += Convert.ToDouble(dt.Rows[i]["allCount"]); total_all_amount += Convert.ToDouble(dt.Rows[i]["all_amount"]); total_goods_amount += Convert.ToDouble(dt.Rows[i]["goods_amount"]); total_goods_nums += Convert.ToDouble(dt.Rows[i]["goods_nums"]); } OrderList.DataShow(dt); }
protected void BindOrderList(int index) { int count = 0; string where = getWhere(); SqlHelper conn = LocalSqlHelper.WH; SqlHelper helper = LocalSqlHelper.WH; string sql = "select b.cashier_id,allCount=count(*),cashier_name=isnull((select fullname from wareHouse_Admin where id=b.cashier_id),''),sum(b.order_amount) as all_amount,0.00 as goods_amount,0 as goods_nums from Direct_OrderMain b where " + where + " group by b.cashier_id"; DataTable dt = conn.ExecDataTable(sql); for (int i = 0; i < dt.Rows.Count; i++) { helper.Params.Clear(); DataTable dt_new = helper.ExecDataTable("select isnull(sum(danjia*productcount),0) as goods_amount,isnull(sum(productcount),0) as goods_nums from Direct_OrderDetail where dingdan in (select dingdan from Direct_OrderMain b where " + where + ")"); dt.Rows[i]["goods_amount"] = dt_new.Rows[0]["goods_amount"]; dt.Rows[i]["goods_nums"] = dt_new.Rows[0]["goods_nums"]; total_allCount += Convert.ToDouble(dt.Rows[i]["allCount"]); total_all_amount += Convert.ToDouble(dt.Rows[i]["all_amount"]); total_goods_amount += Convert.ToDouble(dt.Rows[i]["goods_amount"]); total_goods_nums += Convert.ToDouble(dt.Rows[i]["goods_nums"]); } OrderList.DataShow(dt); }
protected void BindOrderList(int index) { int count = 0; string where = getWhere(); SqlHelper conn = LocalSqlHelper.WH; AspNetPager1.PageSize = 20; DataTable dt = conn.TablesPageNew("Direct_OrderMain", "*,cashier_name=isnull((select fullname from wareHouse_Admin where id=Direct_OrderMain.cashier_id),''),guide_name=isnull((select guide_name from Tb_guide_staff where guide_id=Direct_OrderMain.guide_id),'')", "fksj desc", true, AspNetPager1.PageSize, index, where, out count); for (int i = 0; i < dt.Rows.Count; i++) { } OrderList.DataShow(dt); AspNetPager1.RecordCount = count; AspNetPager1.UrlRewritePattern = "SellList.aspx?page={0}&" + queryStr; SqlHelper helper = LocalSqlHelper.WH; dt = helper.ExecDataTable("select isnull(sum(order_amount),0) as order_real_all,isnull(sum(order_amount+order_plus),0) as order_amount_all from Direct_OrderMain where " + where); order_real_all = Convert.ToDouble(dt.Rows[0]["order_real_all"]); order_amount_all = Convert.ToDouble(dt.Rows[0]["order_amount_all"]); }