示例#1
0
 protected void btnOk_Click(object sender, EventArgs e)
 {
     GridViewStart.DataBind();
     GridViewIn.DataBind();
     GridViewOut.DataBind();
     GridViewEnd.DataBind();
 }
        private void BindInItem(string incode)
        {
            string    sql = "select WG_CODE,WG_MARID,MNAME,GUIGE,CGDW,cast(WG_RSNUM as float) AS WG_RSNUM,cast(WG_UPRICE as float) as WG_UPRICE,cast(WG_AMOUNT as float) as WG_AMOUNT,WG_TAXRATE,cast(WG_CTAXUPRICE as float) as WG_CTAXUPRICE, cast(WG_CTAMTMNY as float) as WG_CTAMTMNY,HMCODE from View_SM_IN where WG_CODE='" + incode + "'";
            DataTable dt  = DBCallCommon.GetDTUsingSqlText(sql);

            GridViewIn.DataSource = dt;
            GridViewIn.DataBind();
        }
        private void BindInItem(string VoiceCode, string incode)
        {
            //string sql = "select WG_MARID,MNAME,GUIGE,CGDW,cast(sum(WG_RSNUM) as float) AS WG_RSNUM,cast(round(avg(WG_UPRICE),4) as float) as WG_UPRICE,cast(round(sum(WG_AMOUNT),2) as float) as WG_AMOUNT,WG_TAXRATE,cast(round(avg(WG_CTAXUPRICE),4) as float) as WG_CTAXUPRICE, cast(round(sum(WG_CTAMTMNY),2) as float) as WG_CTAMTMNY from View_SM_IN where WG_CODE='" + incode + "' group by WG_MARID,MNAME,GUIGE,CGDW,WG_TAXRATE";
            string sql = "select GI_MATCODE,GI_NAME,GI_GUIGE,GI_UNIT,cast(SUM(GI_NUM) as float) AS GI_NUM,cast(round(AVG(GI_UNITPRICE),4) as float) AS GI_UNITPRICE,cast(round(SUM(GI_INAMTMNY),2) as float) AS GI_AMTMNY,GI_TAXRATE,cast(round(AVG(GI_CTAXUPRICE),4) as float) AS GI_CTAXUPRICE,cast(round(SUM(GI_INCATAMTMNY),2) as float) AS GI_CTAMTMNY  from TBFM_GHINVOICEDETAIL where GI_CODE='" + VoiceCode + "' and GI_UNICODE like '" + incode.Split('S')[0] + "%' group by GI_MATCODE,GI_NAME,GI_GUIGE,GI_UNIT,GI_TAXRATE";

            DataTable dt = DBCallCommon.GetDTUsingSqlText(sql);

            GridViewIn.DataSource = dt;
            GridViewIn.DataBind();
        }
示例#4
0
        public void bind()
        {
            string startime = Convert.ToDateTime(Start).ToString("yyyy-MM-dd");
            string endtime  = Convert.ToDateTime(End).ToString("yyyy-MM-dd");

            sql = " select ROW_NUMBER() OVER (ORDER BY CASE WHEN substring(MaterialCode,1,5) like '01.07'  THEN 0 ELSE 1 END, WarehouseCode ASC) AS Row_Num,* from View_SM_OUT where PTC  LIKE '%" + SCZH + "' and ApprovedDate>='" + startime + "' and  ApprovedDate< '" + endtime + "' and billtype='3' ";
            DataTable dt = DBCallCommon.GetDTUsingSqlText(sql);

            GridViewIn.DataSource = dt;
            GridViewIn.DataBind();
        }