Esempio n. 1
0
    /// <summary>
    /// 绑定销售订单信息列表
    /// </summary>
    public void Bind()
    {
        int       pageCount = 0;
        int       Counts    = 0;
        string    strwhere  = Where();
        DataTable dt        = new Hi.BLL.YZT_GoodsStock().getDataTable(Pager.PageSize, Pager.CurrentPageIndex, strwhere, out pageCount, out Counts, Pager.RecordCount);

        this.rptOrder.DataSource = dt;
        this.rptOrder.DataBind();

        Pager.RecordCount = Counts;
        page = Pager.CurrentPageIndex.ToString();
    }
Esempio n. 2
0
    public string disBings(string OrderOutDetailID = "")
    {
        string strwhere = "  DisID=" + DisID + " ";

        if (!Util.IsEmpty(OrderOutDetailID))
        {
            strwhere += " and id in(" + OrderOutDetailID + ")";
        }
        List <Hi.Model.YZT_GoodsStock> storageDetailList = new Hi.BLL.YZT_GoodsStock().GetList("", strwhere, "");
        DataTable dt = Common.FillDataTable(storageDetailList);

        return(ConvertJson.ToJson(dt));
    }
Esempio n. 3
0
    public string disBings(string OrderOutDetailID = "", string inindex = "")
    {
        string strwhere = "  DisID=" + DisID + " ";

        if (!Util.IsEmpty(OrderOutDetailID))
        {
            strwhere += " and id in(" + OrderOutDetailID + ")";
        }
        if (inindex == "-1")
        {
            List <Hi.Model.YZT_LibraryDetail> DetailList1 = new Hi.BLL.YZT_LibraryDetail().GetList("", strwhere, "");
            DataTable dt2 = Common.FillDataTable(DetailList1);
            return(ConvertJson.ToJson(dt2));
        }
        List <Hi.Model.YZT_GoodsStock> DetailList2 = new Hi.BLL.YZT_GoodsStock().GetList("", strwhere, "");
        DataTable dt = Common.FillDataTable(DetailList2);

        return(ConvertJson.ToJson(dt));
    }
Esempio n. 4
0
    /// <summary>
    /// 绑定销售订单信息列表
    /// </summary>
    public void Bind()
    {
        int    pageCount = 0;
        int    Counts    = 0;
        string strwhere  = Where();

        if (ViewState["goods_sql"] != null)
        {
            strwhere += ViewState["goods_sql"].ToString();
        }

        DataTable dt = new Hi.BLL.YZT_GoodsStock().getDataTable(Pager.PageSize, Pager.CurrentPageIndex, strwhere, out pageCount, out Counts, Pager.RecordCount);

        //dt.DefaultView.Sort = "validDate ASC";

        this.rptOrder.DataSource = dt;
        this.rptOrder.DataBind();

        Pager.RecordCount = Counts;
        page = Pager.CurrentPageIndex.ToString();
    }
Esempio n. 5
0
 public string getStockNum(string StockID, string OutNum)
 {
     if (string.IsNullOrWhiteSpace(StockID))
     {
         return("0");
     }
     else
     {
         Hi.Model.YZT_GoodsStock model = new Hi.BLL.YZT_GoodsStock().GetModel(Convert.ToInt32(StockID));
         if (model == null)
         {
             return("0");
         }
         else if (model.StockNum < (model.StockUseNum - Convert.ToDecimal(OutNum)))
         {
             return("0");
         }
         else
         {
             return((model.StockNum - (model.StockUseNum - Convert.ToDecimal(OutNum))).ToString());
         }
         //else return model.StockNum.ToString();
     }
 }