예제 #1
0
        private void DataSearch()
        {
            int total = 0;

            DataTable dtData = PubFunc.DbGetPage(GridGoods.PageIndex, GridGoods.PageSize, GetSearchSql(), ref total);

            GridGoods.RecordCount = total;
            GridGoods.DataSource  = dtData;
            GridGoods.DataBind();
            //绑定Summary
            decimal toth = 0, tock = 0, je = 0;

            foreach (DataRow dr in dtData.Rows)
            {
                toth += Convert.ToDecimal((dr["THSL"] ?? "0"));
                tock += Convert.ToDecimal((dr["CKSL"] ?? "0"));
                je   += Convert.ToDecimal((dr["HSJE"] ?? "0"));
            }
            JObject summary = new JObject();

            summary.Add("STR5NAME", "本页合计");
            summary.Add("THSL", toth.ToString());
            summary.Add("CKSL", tock.ToString());
            summary.Add("HSJE", je.ToString("F2"));
            GridGoods.SummaryData = summary;
        }
예제 #2
0
        private void DataQuery()
        {
            String sql      = @"SELECT DBC.USERS USERID,OU.USERNAME,DBC.ISSEND,DECODE(DBC.ISSEND,'N','未发送','Y','已发送','E','异常')ISSENDNAME,DBC.BRCONTENT,DBC.TIMEUP FROM DOC_BRIEF_CON DBC,SYS_OPERUSER OU WHERE DBC.USERS=OU.USERID ";
            int    total    = 0;
            string strwhere = "";

            PubFunc.FormDataCheck(FormSearch);
            if (!string.IsNullOrEmpty(ddlUSERS.SelectedValue))
            {
                strwhere += string.Format(" AND OU.USERID LIKE'%{0}%' ", ddlUSERS.SelectedValue);
            }
            if (!string.IsNullOrEmpty(ddlISSEND.SelectedValue))
            {
                strwhere += string.Format(" AND DBC.ISSEND='{0}' ", ddlISSEND.SelectedValue);
            }
            if (dpkBegRQ.SelectedDate != null && dpkEndRQ.SelectedDate != null)
            {
                strwhere += string.Format(" AND TRUNC(DBC.TIMEUP,'DD') BETWEEN TRUNC(TO_DATE('{0}','YYYY-MM-DD HH24:MI:SS'),'DD') AND TRUNC(TO_DATE('{1}','YYYY-MM-DD HH24:MI:SS'),'DD')  ", dpkBegRQ.SelectedDate, dpkEndRQ.SelectedDate);
            }
            DataTable dt = PubFunc.DbGetPage(GridToBrief.PageIndex, GridToBrief.PageSize, sql + strwhere + " ORDER BY DECODE(DBC.ISSEND,'1','2'),DBC.TIMEUP ", ref total);

            GridToBrief.DataSource  = dt;
            GridToBrief.RecordCount = total;
            GridToBrief.DataBind();
        }
예제 #3
0
        protected void btnSearch()
        {
            string strSQL = " select seqno,isprivate,(select username from sys_operuser where userid = lrr) as lrName,lrrq,title,Memo,waringRQ,lookper,(select username from sys_operuser where userid = closeper) as closename, closerq ,case when flag = 'N' then '新备忘' when flag='C' then '已取消' else '已完成' end as status from sys_mymemo  where (lrr='" + UserAction.UserID + "' or LookPer||','  like '%" + UserAction.UserID + ",%')  ";

            if (!string.IsNullOrEmpty(tbSearchTitle.Text.Trim()))
            {
                strSQL += "  AND TITLE LIKE '%" + tbSearchTitle.Text.Trim() + "'";
            }
            if (dpSearchStart.SelectedDate != null)
            {
                strSQL += "  AND lrrq >=to_date('" + Convert.ToDateTime(dpSearchStart.SelectedDate).ToString("yyyy-MM-dd") + "','YYYY-MM-DD')";
            }
            if (dpSearchEnd.SelectedDate != null)
            {
                strSQL += "  AND lrrq <to_date('" + Convert.ToDateTime(dpSearchEnd.SelectedDate).ToString("yyyy-MM-dd") + "','YYYY-MM-DD')+1";
            }
            strSQL += " order by lrrq desc";
            int total = 0;

            DataTable dt = PubFunc.DbGetPage(GridList.PageIndex, GridList.PageSize, strSQL, ref total);

            GridList.DataSource  = dt;
            GridList.RecordCount = total;
            GridList.DataBind();
        }
예제 #4
0
 protected void btnSrchBill_Click(object sender, EventArgs e)
 {
     if (docSTR1.Text.Length > 0)
     {
         String Sql = @"SELECT DISTINCT A.SEQNO,f_getdeptname(A.DEPTID) DEPTNAME,f_getsupname(A.PSSID) PSSNAME,A.SHRQ
                     FROM DAT_YRK_DOC A,DAT_YRK_COM B,DOC_GOODSCFG C
                     WHERE A.SEQNO = B.SEQNO AND B.GDSEQ = C.GDSEQ AND A.FLAG = 'Y'AND A.SEQNO='{3}'
                     AND C.DEPTID = '{0}' AND A.SHRQ BETWEEN TO_DATE('{1}','YYYY-MM-DD') AND TO_DATE('{2}','YYYY-MM-DD') + 1";
         if (ddlDEPTIN.SelectedValue.Length > 0)
         {
             Sql += "AND A.DEPTID = '" + ddlDEPTIN.SelectedValue + "'";
         }
         int       total  = 0;
         DataTable dtData = PubFunc.DbGetPage(GridBill.PageIndex, GridBill.PageSize, String.Format(Sql, docDEPTID.SelectedValue, dbkTime1.Text, dbkTime2.Text, docSTR1.Text), ref total);
         GridBill.RecordCount = total;
         GridBill.DataSource  = dtData;
         GridBill.DataBind();
     }
     else
     {
         String Sql = @"SELECT DISTINCT A.SEQNO,f_getdeptname(A.DEPTID) DEPTNAME,f_getsupname(A.PSSID) PSSNAME,A.SHRQ
                     FROM DAT_YRK_DOC A,DAT_YRK_COM B,DOC_GOODSCFG C
                     WHERE A.SEQNO = B.SEQNO AND B.GDSEQ = C.GDSEQ AND A.FLAG = 'Y'
                     AND C.DEPTID = '{0}' AND A.SHRQ BETWEEN TO_DATE('{1}','YYYY-MM-DD') AND TO_DATE('{2}','YYYY-MM-DD') + 1";
         if (ddlDEPTIN.SelectedValue.Length > 0)
         {
             Sql += " AND A.DEPTID = '" + ddlDEPTIN.SelectedValue + "'";
         }
         int       total  = 0;
         DataTable dtData = PubFunc.DbGetPage(GridBill.PageIndex, GridBill.PageSize, String.Format(Sql, docDEPTID.SelectedValue, dbkTime1.Text, dbkTime2.Text), ref total);
         GridBill.RecordCount = total;
         GridBill.DataSource  = dtData;
         GridBill.DataBind();
     }
 }
예제 #5
0
        private void DataSearch()
        {
            if (lstLRRQ1.SelectedDate == null || lstLRRQ2.SelectedDate == null)
            {
                Alert.Show("请输入条件【查询期间】!", MessageBoxIcon.Warning);
                return;
            }
            else if (lstLRRQ1.SelectedDate > lstLRRQ2.SelectedDate)
            {
                Alert.Show("【开始日期】大于【结束日期】,请重新输入!", MessageBoxIcon.Warning);
                return;
            }
            if (ddlDEPTID.SelectedValue.Length < 1)
            {
                Alert.Show("请输入条件【库房】!", MessageBoxIcon.Warning);
                return;
            }
            int total = 0;

            DataTable dtData = PubFunc.DbGetPage(GridList.PageIndex, GridList.PageSize, GetSearchSql(), ref total);

            GridList.RecordCount = total;
            GridList.DataSource  = dtData;
            GridList.DataBind();
        }
예제 #6
0
        private void DataSearch()
        {
            int           total  = 0;
            string        sql    = @"select  SP.*,F_GETUNITNAME(UNIT) UNITNAME,F_GETPRODUCERNAME(SP.PRODUCER) PRODUCERNAME,F_GETSUPNAME(SUPPLIER) SUPPLIERNAME, 
                                   F_GETUNITNAME(UNIT_ORDER) UNIT_ORDER_NAME,F_GETUNITNAME(UNIT_SELL) UNIT_SELL_NAME,F_GETUNITNAME(UNIT_DABZ) UNIT_DABZ_NAME,
                                   F_GETUNITNAME(UNIT_ZHONGBZ) UNIT_ZHONGBZ_NAME,PZ.HJCODE1 HWID
                             from  DOC_GOODS SP,DOC_GOODSCFG PZ WHERE ISDELETE='N' and sp.flag='Y' AND SP.GDSEQ=PZ.GDSEQ(+) ";
            StringBuilder strSql = new StringBuilder(sql);

            if (!string.IsNullOrWhiteSpace(hfdSearch.Text))
            {
                strSql.AppendFormat(" AND (SP.GDSEQ LIKE '%{0}%' OR SP.GDNAME LIKE '%{0}%' OR SP.ZJM LIKE '%{0}%' OR SP.BARCODE LIKE '%{0}%')", hfdSearch.Text.ToUpper());
            }
            if (!string.IsNullOrWhiteSpace(hfdDept.Text))
            {
                strSql.AppendFormat(" AND PZ.DEPTID='{0}' AND PZ.ISCFG='1'", hfdDept.Text);
            }
            if (!string.IsNullOrWhiteSpace(hfdSupplier.Text))
            {
                strSql.AppendFormat(" AND SP.SUPPLIER = '{0}'", hfdSupplier.Text);
            }
            strSql.AppendFormat(" ORDER BY SP.{0} {1}", GridGoods.SortField, GridGoods.SortDirection);

            DataTable dtData = PubFunc.DbGetPage(GridGoods.PageIndex, GridGoods.PageSize, strSql.ToString(), ref total);

            GridGoods.RecordCount = total;
            GridGoods.DataSource  = dtData;
            GridGoods.DataBind();
        }
예제 #7
0
        private void dataSearch()
        {
            string query = "%";

            if (!string.IsNullOrWhiteSpace(tgbSearch.Text))
            {
                query = tgbSearch.Text.Trim();
            }
            int    total = 0;
            string sql   = string.Format("select SUPID,SUPNAME,TEL,LINKMAN,LOGINADDR,DECODE(FLAG, 'Y', '审核通过', 'N', '未审核') flag,DECODE(ISDG,'Y','是','N','否') ISDG,DECODE(STR1,'Y','是','否') ISBD from  DOC_SUPPLIER WHERE  (SUPID like '%{0}%' or SUPNAME like'%{0}%') and FLAG<>'E'", query);

            if (!string.IsNullOrWhiteSpace(lstFLAG.SelectedValue))
            {
                sql += string.Format(" and FLAG = '{0}'", lstFLAG.SelectedValue);
            }
            //if (!string.IsNullOrWhiteSpace(lstISSEND.SelectedValue))
            //{
            //    sql += string.Format(" and ISSEND = '{0}'", lstISSEND.SelectedValue);
            //}
            DataTable dtData = PubFunc.DbGetPage(GridSupplier.PageIndex, GridSupplier.PageSize, sql, ref total);

            GridSupplier.RecordCount = total;
            GridSupplier.DataSource  = dtData;
            GridSupplier.DataBind();
        }
예제 #8
0
        private void DataSearch()
        {
            int total = 0;
            //使用his名称、规格,SP.GDNAME,SP.GDSPEC
            string        sql    = @"SELECT  SP.GDSEQ,SP.GDID,SP.BARCODE,SP.ZJM,SP.YCODE,SP.NAMEJC,SP.NAMEEN,SP.GDMODE,SP.STRUCT,SP.BZHL,SP.UNIT,SP.FLAG,SP.CATID,SP.JX,SP.YX,SP.PIZNO,SP.BAR1,SP.BAR2,SP.BAR3,SP.DEPTID,SP.SUPPLIER,SP.LOGINLABEL,SP.PRODUCER,SP.ZPBH,SP.PPID,SP.CDID,SP.JXTAX,SP.XXTAX,SP.BHSJJ,SP.HSJJ,SP.LSJ,SP.YBJ,SP.HSID,SP.HSJ,SP.JHZQ,SP.ZDKC,
                                    SP.HLKC,SP.ZGKC,SP.SPZT,SP.DAYXS,SP.MANAGER,SP.INPER,SP.INRQ,SP.BEGRQ,SP.ENDRQ,SP.UPTRQ,SP.UPTUSER,SP.MEMO,DISABLEORG,SP.ISLOT,SP.ISJB,SP.ISFZ,SP.ISGZ,SP.ISIN,SP.ISJG,SP.ISDM,SP.ISCF,SP.ISYNZJ,SP.ISFLAG1,NVL(SP.STR3,SP.GDSPEC) GDSPEC,SP.UNIT_DABZ,SP.UNIT_ZHONGBZ,SP.BARCODE_DABZ,SP.NUM_DABZ,SP.NUM_ZHONGBZ,SP.UNIT_ORDER,SP.UNIT_SELL,SP.HISCODE,NVL(SP.HISNAME,SP.GDNAME) GDNAME,SP.CATID0,
                                    F_GETUNITNAME(UNIT) UNITNAME,F_GETPRODUCERNAME(SP.PRODUCER) PRODUCERNAME,F_GETSUPNAME(SUPPLIER) SUPPLIERNAME, 
                                   F_GETUNITNAME(UNIT_ORDER) UNIT_ORDER_NAME,F_GETUNITNAME(UNIT_SELL) UNIT_SELL_NAME,F_GETUNITNAME(UNIT_DABZ) UNIT_DABZ_NAME,
                                   F_GETUNITNAME(UNIT_ZHONGBZ) UNIT_ZHONGBZ_NAME,PZ.HJCODE1 HWID
                             FROM  DOC_GOODS SP,DOC_GOODSCFG PZ WHERE ISDELETE='N' AND SP.FLAG='Y' AND SP.GDSEQ=PZ.GDSEQ(+) ";
            StringBuilder strSql = new StringBuilder(sql);

            if (!string.IsNullOrWhiteSpace(hfdSearch.Text))
            {
                strSql.AppendFormat(" AND (SP.GDSEQ LIKE '%{0}%' OR SP.GDNAME LIKE '%{0}%' OR SP.ZJM LIKE '%{0}%' OR SP.BARCODE LIKE '%{0}%')", hfdSearch.Text.ToUpper());
            }
            if (!string.IsNullOrWhiteSpace(hfdDept.Text))
            {
                strSql.AppendFormat(" AND PZ.DEPTID='{0}' AND PZ.ISCFG IN ('1','Y')", hfdDept.Text);
            }
            if (!string.IsNullOrWhiteSpace(hfdSupplier.Text))
            {
                strSql.AppendFormat(" AND SP.SUPPLIER = '{0}'", hfdSupplier.Text);
            }
            strSql.AppendFormat(" ORDER BY SP.{0} {1}", GridGoods.SortField, GridGoods.SortDirection);

            DataTable dtData = PubFunc.DbGetPage(GridGoods.PageIndex, GridGoods.PageSize, strSql.ToString(), ref total);

            GridGoods.RecordCount = total;
            GridGoods.DataSource  = dtData;
            GridGoods.DataBind();
        }
예제 #9
0
        protected void DataSearch()
        {
            string strs = ""; int totalnum = 0;
            string strSQL = @"SELECT SEQNO,DDCODE,SUPID,SUPNAME,USERNAME,STAFFTEL,STAFFTEL2,DECODE(ISGZ,'Y','高值','N','非高值') ISGZ,DECODE(BILLFLAG,'S','未受理','010','已受理','Y','已出库') BILLFLAG,
                                XDRQ,ISSEND,SENDTIME,MSGCONTENT,DECODE(ISSENDR,'N','不重发','Y','准备重发','S','重发成功','E','重发失败') ISSENDR,SENDTIMER,FLAG,MEMO 
                                FROM DAT_DD_REMIND WHERE 0=0 ";

            if (!string.IsNullOrEmpty(lstSUPPLIER.SelectedValue))
            {
                strs += string.Format(" AND SUPID='{0}' ", lstSUPPLIER.SelectedValue);
            }
            if (!string.IsNullOrEmpty(lstISGZ.SelectedValue))
            {
                strs += string.Format(" AND ISGZ='{0}' ", lstISGZ.SelectedValue);
            }
            if (!string.IsNullOrEmpty(lstBILLFLAG.SelectedValue))
            {
                strs += string.Format(" AND BILLFLAG='{0}' ", lstBILLFLAG.SelectedValue);
            }
            strs   += " ORDER BY SENDTIME DESC ";
            strSQL += strs;

            DataTable dta = PubFunc.DbGetPage(GridCom.PageIndex, GridCom.PageSize, strSQL, ref totalnum);

            GridCom.DataSource  = dta;
            GridCom.RecordCount = totalnum;
            GridCom.DataBind();
        }
예제 #10
0
        protected void btnGridOut_Click(object sender, EventArgs e)
        {
            int    total   = 0;
            string Sql     = @"SELECT A.*,B.GDNAME,B.GDSPEC,B.PIZNO PZWH,f_getproducername(B.PRODUCER) PRODUCERNAME,D.NAME UNITNAME,C.NAME HOSNAME,B.BAR3 EAS_CODE,
                    DECODE(B.FLAG,'Y','正常','未下传') FLAGNAME,DECODE(A.PPMODE,'1','精确匹配','2','模糊匹配','3','手工匹配','历史匹配') PPMODENAME 
                    FROM DAT_UPLOAD_GOODS A,DOC_GOODS B,DOC_CUSTOMER C,DOC_GOODSUNIT D
                    WHERE A.GDSEQ = B.GDSEQ(+) AND A.CUSTID = C.CODE(+) AND B.UNIT = D.CODE(+) AND A.FLAG = 'Y'";
            string Stearch = "";

            if (!PubFunc.StrIsEmpty(ddlHisp.SelectedValue))
            {
                Stearch += string.Format(" AND A.CUSTID = '{0}'", ddlHisp.SelectedValue);
            }
            if (!PubFunc.StrIsEmpty(ddlMode.SelectedValue))
            {
                Stearch += string.Format(" AND A.PPMODE = '{0}'", ddlMode.SelectedValue);
            }
            if (!PubFunc.StrIsEmpty(TgbBill.Text))
            {
                Stearch += string.Format(" AND A.SEQNO = '{0}'", TgbBill.Text);
            }
            if (!PubFunc.StrIsEmpty(tgbGoods.Text))
            {
                Stearch += string.Format(" AND (B.GDSEQ LIKE '%{0}%' OR B.GDNAME LIKE '%{0}%' OR B.BAR3 LIKE '%{0}%')", tgbGoods.Text);
            }
            Stearch += " ORDER BY A.UPTTIME DESC";
            DataTable dtData = PubFunc.DbGetPage(GridOut.PageIndex, GridOut.PageSize, Sql + Stearch, ref total);

            GridOut.RecordCount = total;
            GridOut.DataSource  = dtData;
            GridOut.DataBind();
        }
예제 #11
0
        private void GridYzSch()
        {
            WinYz.Hidden = false;
            string strSql = "";

            if (chkISPHALL.Checked)
            {
                strSql = @"select a.lockbillno,a.lockrowno,b.gdseq, b.gdspec,b.gdname,f_getunitname(b.unit) unitname,abs(a.lockkcsl) lockkcsl,f_getdeptname(a.deptid) deptidname,
                       b.hsjj,b.hsjj*abs(a.lockkcsl) hsje,b.zpbh,a.phid,b.bar3,f_getproducername(b.producer) PRODUCERNAME,b.pizno
                from dat_stocklock a,doc_goods b
                where a.gdseq = b.gdseq and a.lockflag = 'Y' AND b.gdseq = '" + hdfGdseq.Text + "' and a.deptid = '" + hdfDept.Text + "' and a.phid = '" + hdfPhid.Text + "'";
            }
            else
            {
                strSql = @"select a.lockbillno,a.lockrowno,b.gdseq, b.gdspec,b.gdname,f_getunitname(b.unit) unitname,abs(a.lockkcsl) lockkcsl,f_getdeptname(a.deptid) deptidname,
                       b.hsjj,b.hsjj*abs(a.lockkcsl) hsje,b.zpbh,a.phid,b.bar3,f_getproducername(b.producer) PRODUCERNAME,b.pizno
                from dat_stocklock a,doc_goods b
                where a.gdseq = b.gdseq and a.lockflag = 'Y' AND a.picino = '" + hdfPicino.Text + "'";
            }
            int total = 0;

            GridYz.DataSource  = PubFunc.DbGetPage(GridYz.PageIndex, GridYz.PageSize, strSql, ref total);
            GridYz.RecordCount = total;
            GridYz.DataBind();
        }
예제 #12
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            if (lstLRRQ1.SelectedDate == null || lstLRRQ2.SelectedDate == null)
            {
                Alert.Show("请输入条件【申领日期】!", "提示信息", MessageBoxIcon.Warning);
                return;
            }
            else if (lstLRRQ1.SelectedDate > lstLRRQ2.SelectedDate)
            {
                Alert.Show("【开始日期】大于【结束日期】,请重新输入!", "提示信息", MessageBoxIcon.Warning);
                return;
            }

            int       total = 0;
            DataTable dt    = PubFunc.DbGetPage(GridList.PageIndex, GridList.PageSize, GetSearchSQL(), ref total);

            GridList.DataSource  = dt;
            GridList.RecordCount = total;
            GridList.DataBind();
            decimal Total1 = 0, Total2 = 0;

            foreach (DataRow row in dt.Rows)
            {
                Total1 += Convert.ToDecimal(row["SUBSUM"] ?? "0");
                Total2 += Convert.ToDecimal(row["SUBNUM"] ?? "0");
            }
            JObject summary = new JObject();

            summary.Add("DEPTOUTNAME", "本页合计");
            summary.Add("SUBSUM", Total1);
            summary.Add("SUBNUM", Total2);
            GridList.SummaryData = summary;
        }
예제 #13
0
        protected void tbxGOODS_TriggerClick(object sender, EventArgs e)
        {
            Regex regex = new Regex(@"^[0-9]*$");
            Match maa   = regex.Match(tbgBC.Text);

            if (!maa.Success)
            {
                Alert.Show("【波次信息】请输入数字类型!");
                return;
            }
            if (lstLRRQ1.SelectedDate == null || lstLRRQ2.SelectedDate == null)
            {
                Alert.Show("请输入条件【分配日期】!");
                return;
            }
            else if (lstLRRQ1.SelectedDate > lstLRRQ2.SelectedDate)
            {
                Alert.Show("【开始日期】大于【结束日期】,请重新输入!", MessageBoxIcon.Warning);
                return;
            }
            int       total  = 0;
            DataTable dtData = PubFunc.DbGetPage(GridGoods.PageIndex, GridGoods.PageSize, GetSearchSql(), ref total);

            //OutputSummaryData(dtData);
            GridGoods.RecordCount = total;
            GridGoods.DataSource  = dtData;
            GridGoods.DataBind();
        }
예제 #14
0
        private void dataSearch()
        {
            int    total      = 0;
            string sql        = @"select CODE,NAME,DECODE(FLAG,'Y','正常','N','停用','其他') flag,
                                DECODE(OBJUSER,'SUPPLIER','供应商证照','GOODS','商品证照') objuser,
                                decode(isneed,'Y','是','N','否') isneed,
                                decode(isdate,'Y','是','N','否') isdate,
                                decode(isdup,'Y','是','N','否') isdup,
                                memo, SORT from  doc_license WHERE 1=1";
            string strFLAG    = lstFLAG.SelectedValue.ToString();
            string strOBJUSER = lstOBJUSER.SelectedValue.ToString();

            if (!string.IsNullOrWhiteSpace(strFLAG))
            {
                sql += " and FLAG = '" + strFLAG + "'";
            }
            if (!string.IsNullOrWhiteSpace(strOBJUSER))
            {
                sql += " and OBJUSER = '******'";
            }
            string query = "%";

            if (!string.IsNullOrWhiteSpace(tgbSearch.Text))
            {
                query = tgbSearch.Text.Trim();
                sql  += string.Format(" and ( CODE like '%{0}%' or NAME like '%{0}%')", query);
            }
            DataTable dtData = PubFunc.DbGetPage(GridSupplier.PageIndex, GridSupplier.PageSize, sql, ref total);

            GridSupplier.RecordCount = total;
            GridSupplier.DataSource  = dtData;
            //GridSupplier.DataSource = DbHelperOra.Query(string.Format(sql, query));
            GridSupplier.DataBind();
        }
예제 #15
0
        private void DataSearch()
        {
            if (PubFunc.StrIsEmpty(dpkKSRQ.SelectedDate.ToString()) || PubFunc.StrIsEmpty(dpkJSRQ.SelectedDate.ToString()))
            {
                Alert.Show("输入日期不正确,请检查!");
                return;
            }
            if (dpkKSRQ.SelectedDate > dpkJSRQ.SelectedDate)
            {
                Alert.Show("开始日期不能大于结束日期!");
                return;
            }
            string strMonitor = " ";

            strMonitor += " AND execrq BETWEEN TO_DATE('" + dpkKSRQ.Text + "','YYYY/MM/DD') and TO_DATE('" + dpkJSRQ.Text + "','YYYY/MM/DD') + 1";

            if (chkCHULI.Checked)
            {
                strMonitor += " AND FLAG  = 'N' ";
            }
            strSql = strSql + strMonitor;

            int total = 0;

            DataTable dtData = PubFunc.DbGetPage(GridList.PageIndex, GridList.PageSize, strSql, ref total);

            GridList.RecordCount = total;
            GridList.DataSource  = dtData;
            GridList.DataBind();
        }
예제 #16
0
        private void HwidQuery()
        {
            string code = tbxGDSEQ.Text;
            string dept = ddlDept.SelectedValue;
            string sql  = @"SELECT HWID,
                               JWBH,
                               KFBH,
                               KB,
                               f_getusername(MANAGER) MANAGER,
                               HWZT,
                               DZBQH,      
                               F_GETDEPTNAME(a.KFBH) KFBHNAME,
                               (select NAME
                                  FROM SYS_CODEVALUE c
                                 WHERE c.TYPE = 'DEPOT_AREA'
                                   and c.code = a.KB) KBNAME,
                                QYBH,PAI,LIE,CENG
                          FROM DOC_HWZD A   where kfbh = '{0}' and hwzt = 'Y'";

            if (!string.IsNullOrWhiteSpace(trbSearch1.Text.Trim()))
            {
                sql += string.Format(" and (HWID like '%{0}%' or JWBH like '%{0}%' or QYBH like '%{0}%')", trbSearch1.Text.Trim());
            }

            int       total     = 0;
            DataTable dt_huowei = PubFunc.DbGetPage(HwList.PageIndex, HwList.PageSize, string.Format(sql, dept), ref total);

            HwList.RecordCount = total;
            HwList.DataSource  = dt_huowei;
            HwList.DataBind();
        }
예제 #17
0
        private void DataSearch()
        {
            int total = 0;

            lblSUBNUM.Text = "0";
            lblSUBSUM.Text = "0";
            DataTable dtSum = DbHelperOra.Query("SELECT SUM(NVL(SL,0)) SL,SUM(NVL(JE,0)) JE FROM (" + GetSearchSql() + ")").Tables[0];

            if (dtSum.Rows.Count > 0)
            {
                lblSUBNUM.Text = dtSum.Rows[0]["JE"].ToString();
                lblSUBSUM.Text = dtSum.Rows[0]["SL"].ToString();
            }
            if (docDHLX2.SelectedValue.Length < 1)
            {
                Alert.Show("请选择转商品类型!", MessageBoxIcon.Warning);
                return;
            }
            DataTable dtData = PubFunc.DbGetPage(GridGoods.PageIndex, GridGoods.PageSize, GetSearchSql(), ref total);

            OutputSummaryData(dtData);
            GridGoods.RecordCount = total;
            GridGoods.DataSource  = dtData;
            GridGoods.DataBind();
        }
예제 #18
0
        protected void billSearch()
        {
            string strSql         = @"select A.GDSEQ,
                               A.GDNAME,
                               A.GDSPEC,
                               f_getunitname(A.UNIT) UNIT,
                               f_getdeptname(B.DEPTID) DEPTIDname,
                               B.DEPTID,
                               B.ZDKC,
                               B.ZGKC,
                               B.DSNUM,
                               B.NUM1,
                               B.NUM2,
                               B.NUM3,
                               F_GETISCOLLECT(B.DEPTID, A.GDSEQ) COLLECT,
                               F_GETPRODUCERNAME(A.PRODUCER) PRODUCERNAME,
                               PIZNO,
                               (B.DSNUM * B.NUM1) DSKUCUN,
                               NVL(B.DSPOOL, 0) DSPOOL,
                               --DECODE((NVL(B.DSNUM, 0) - NVL(B.NUM3, 0)), 0, '已配送', NVL(B.DSNUM, 0) - NVL(B.NUM3, 0)) NOTDS
                               --应出定数 = 定数数量-代收定数-定数预占       
                               CASE 
                                 WHEN (NVL(B.DSNUM, 0) - NVL(B.NUM3, 0) - NVL(B.DSPOOL, 0)) >0 THEN (NVL(B.DSNUM, 0) - NVL(B.NUM3, 0) - NVL(B.DSPOOL, 0))  
                                 --WHEN (NVL(B.DSNUM, 0) - NVL(B.NUM3, 0) - NVL(B.DSPOOL, 0)) <= 0  THEN 0
                                 ELSE 0 END YCDS           
                          from doc_goods A, DOC_GOODSCFG B
                         where a.gdseq(+) = b.gdseq";
            string strSearch      = "";
            string strSearchOrder = " order by A.GDSEQ";

            if (tbxGDSEQ.Text.Trim().Length > 0)
            {
                strSearch += string.Format(" AND (B.GDSEQ  LIKE '%{0}%' OR A.GDNAME LIKE '%{0}%')", tbxGDSEQ.Text.Trim());
            }
            if (lstDEPTID.SelectedItem != null && lstDEPTID.SelectedIndex > 0)
            {
                strSearch += string.Format(" AND B.DEPTID = '{0}'", lstDEPTID.SelectedValue);
            }
            if (ShowMode.Checked == false)
            {
                strSearch += " AND ((B.DSNUM >0 AND B.NUM1 > 0) or nvl(B.NUM3,0) >0 )";
            }
            if (DbHelperOra.GetSingle(string.Format("select distinct deptid from SYS_USERRANGE t where userid='{0}'", UserAction.UserID)) != null)
            {
                strSearch += string.Format(" and b.deptid in (select distinct deptid from SYS_USERRANGE t where userid='{0}')", UserAction.UserID);
            }

            strSql += strSearch;
            strSql += strSearchOrder;

            int       total = 0;
            DataTable dt    = PubFunc.DbGetPage(GridList.PageIndex, GridList.PageSize, strSql, ref total);

            GridList.DataSource  = dt;
            GridList.RecordCount = total;
            GridList.DataBind();

            OutputSummaryData(dt);
        }
예제 #19
0
        protected override void billSearch()
        {
            if (dpkLRRQ1.SelectedDate == null || dpkLRRQ2.SelectedDate == null)
            {
                Alert.Show("请输入条件【起始日期】!", "提示信息", MessageBoxIcon.Warning);
                return;
            }
            else if (dpkLRRQ1.SelectedDate > dpkLRRQ2.SelectedDate)
            {
                Alert.Show("【起始日期】大于【终止日期】,请重新输入!", "提示信息", MessageBoxIcon.Warning);
                return;
            }

            string strSql    = @"SELECT A.SEQ,
                                       A.GDSEQ,
                                       A.FLAG,
                                       F_GETDEPTNAME(A.DEPTSY) DEPTID,
                                       A.GDNAME,
                                       A.GDSPEC,
                                       A.SL XHSL,
                                       A.SL SLSL,
                                       A.HSJJ,
                                       A.PRODUCER,
F_GETSUPNAME(A.PRODUCER) PRODUCER_CN,
                                       A.DEPTSY,A.DJRQ
                                  from INF_PH_USE A,DOC_GOODS B
                                 WHERE A.FLAG = 'N' AND A.GDSEQ=B.GDSEQ(+) ";
            string strSearch = "";

            if (ddlDEPTIN.Text.Length > 0)
            {
                strSearch += string.Format(" AND A.DEPTSY = '{0}'", ddlDEPTIN.Text);
            }
            if (ddlISGZ.SelectedItem != null && ddlISGZ.SelectedItem.Value.Length > 0)
            {
                strSearch += string.Format(" AND B.ISGZ = '{0}'", ddlISGZ.SelectedItem.Value);
            }
            if (!string.IsNullOrWhiteSpace(tbxGDSEQ.Text))
            {
                strSearch += string.Format(" AND (UPPER(B.GDSEQ) LIKE '%{0}%' OR UPPER(B.GDNAME) LIKE '%{0}%' OR UPPER(B.ZJM) LIKE '%{0}%')", tbxGDSEQ.Text.Trim().ToUpper());
            }

            strSearch += string.Format(" AND A.DEPTSY in( select code FROM SYS_DEPT where type <>'1' and  F_CHK_DATARANGE(CODE, '{0}') = 'Y' )", UserAction.UserID);
            strSearch += string.Format(" AND A.GETTIME>=TO_DATE('{0}','YYYY-MM-DD')", dpkLRRQ1.Text);
            strSearch += string.Format(" AND A.GETTIME <TO_DATE('{0}','YYYY-MM-DD') + 1", dpkLRRQ2.Text);

            if (!string.IsNullOrWhiteSpace(strSearch))
            {
                strSql += strSearch;
            }

            strSql += "order by " + GridGoods.SortField + " " + GridGoods.SortDirection;
            int       total = 0;
            DataTable dt    = PubFunc.DbGetPage(GridGoods.PageIndex, GridGoods.PageSize, strSql, ref total);

            GridGoods.DataSource  = dt;
            GridGoods.RecordCount = total;
            GridGoods.DataBind();
        }
예제 #20
0
        protected override void billSearch()
        {
            if (lstLRRQ1.SelectedDate == null || lstLRRQ2.SelectedDate == null)
            {
                Alert.Show("请输入条件【申领日期】!", "提示信息", MessageBoxIcon.Warning);
                return;
            }
            else if (lstLRRQ1.SelectedDate > lstLRRQ2.SelectedDate)
            {
                Alert.Show("【开始日期】大于【结束日期】,请重新输入!", "提示信息", MessageBoxIcon.Warning);
                return;
            }

            string strSql    = @"SELECT A.SEQNO,A.BILLNO,A.FLAG,F_GETDEPTNAME(A.DEPTID) DEPTID,A.XSRQ,F_GETDEPTNAME(A.DEPTOUT) DEPTOUT,
                                                      DECODE(A.FLAG,'M','新单','N','已提交','S' ,'已分配','R' ,'已驳回','Y' ,'已出库','G' ,'已结算')  FLAG_CN,
                                                      A.SUBNUM,F_GETUSERNAME(A.SLR) SLR,F_GETUSERNAME(A.LRY) LRY,A.LRRQ,F_GETUSERNAME(A.SHR) SHR,A.SHRQ,A.MEMO,A.STR2,DECODE(OPER,'P','已打印','未打印') PRINT, FUNCTIME,OPERUSER,OPERTIME
                                           FROM DAT_CK_DOC A, SYS_FUNCPRNNUM B
                                       WHERE A.XSTYPE='1' AND A.BILLTYPE='LCD' AND A.SEQNO = B.FUNCNO(+) ";
            string strSearch = "";

            if (lstBILLNO.Text.Length > 0)
            {
                strSearch += string.Format(" AND A.BILLNO  LIKE '%{0}%'", lstBILLNO.Text);
            }
            if (lstFLAG.SelectedItem != null && lstFLAG.SelectedItem.Value.Length > 0)
            {
                strSearch += string.Format(" AND A.FLAG='{0}'", lstFLAG.SelectedItem.Value);
            }
            if (tbxSTR2.Text.Trim().Length > 0)
            {
                strSearch += string.Format(" AND A.STR2 LIKE '%{0}%'", tbxSTR2.Text.Trim());
            }
            if (lstDEPTID.SelectedItem != null && lstDEPTID.SelectedItem.Value.Length > 0)
            {
                strSearch += string.Format(" AND A.DEPTID='{0}'", lstDEPTID.SelectedItem.Value);
            }
            if (lstDEPTOUT.SelectedItem != null && lstDEPTOUT.SelectedItem.Value.Length > 0)
            {
                strSearch += string.Format(" AND DEPTOUT='{0}'", lstDEPTOUT.SelectedItem.Value);
            }
            if (lstLRY.SelectedItem != null && lstLRY.SelectedItem.Value.Length > 0)
            {
                strSearch += string.Format(" AND LRY = '{0}'", lstLRY.SelectedItem.Value);
            }
            strSearch += string.Format(" AND deptid in( select code FROM SYS_DEPT where type <>'1' and  F_CHK_DATARANGE(CODE, '{0}') = 'Y' )", UserAction.UserID);
            strSearch += string.Format(" AND A.LRRQ>=TO_DATE('{0}','YYYY-MM-DD')", lstLRRQ1.Text);
            strSearch += string.Format(" AND A.LRRQ <TO_DATE('{0}','YYYY-MM-DD') + 1", lstLRRQ2.Text);

            if (!string.IsNullOrWhiteSpace(strSearch))
            {
                strSql += strSearch;
            }
            strSql += " ORDER BY DECODE(A.FLAG,'M','1','N','2','S' ,'3','R' ,'4','Y' ,'5','G' ,'6','7'),A.BILLNO DESC";
            int total = 0;

            GridList.DataSource  = PubFunc.DbGetPage(GridList.PageIndex, GridList.PageSize, strSql, ref total);
            GridList.RecordCount = total;
            GridList.DataBind();
        }
예제 #21
0
        private void DataSearch()
        {
            if (PubFunc.StrIsEmpty(dpkDATE1.SelectedDate.ToString()) || PubFunc.StrIsEmpty(dpkDATE2.SelectedDate.ToString()))
            {
                Alert.Show("输入日期不正确,请检查!");
                return;
            }
            if (dpkDATE1.SelectedDate > dpkDATE2.SelectedDate)
            {
                Alert.Show("开始日期不能大于结束日期!");
                return;
            }

            int total = 0;

            DataTable dtData = PubFunc.DbGetPage(GridGoods.PageIndex, GridGoods.PageSize, GetSearchSql(), ref total);
            DataTable dtAll  = DbHelperOra.QueryForTable(GetSearchSql());

            GridGoods.RecordCount = total;
            GridGoods.DataSource  = dtData;
            GridGoods.DataBind();
            //计算合计数量
            if (dtData != null && dtData.Rows.Count > 0)
            {
                decimal slTotal = 0, lsjeTotal = 0, hsjeTotal = 0, bhsjeTotal = 0, slAll = 0, lsjeAll = 0, hsjeAll = 0, bhsjeAll = 0;
                foreach (DataRow row in dtData.Rows)
                {
                    slTotal    += Convert.ToDecimal(row["SL"] ?? "0");
                    lsjeTotal  += Convert.ToDecimal(row["LSJE"] ?? "0");
                    hsjeTotal  += Convert.ToDecimal(row["HSJE"] ?? "0");
                    bhsjeTotal += Convert.ToDecimal(row["BHSJE"] ?? "0");
                }
                foreach (DataRow dr in dtAll.Rows)
                {
                    slAll    += Convert.ToDecimal(dr["SL"] ?? "0");
                    lsjeAll  += Convert.ToDecimal(dr["LSJE"] ?? "0");
                    hsjeAll  += Convert.ToDecimal(dr["HSJE"] ?? "0");
                    bhsjeAll += Convert.ToDecimal(dr["BHSJE"] ?? "0");
                }
                JObject summary = new JObject();
                summary.Add("GDNAME", "本页合计</br>总合计");
                summary.Add("SL", slTotal + "</br>" + slAll);
                summary.Add("LSJE", lsjeTotal.ToString("F2") + "</br>" + lsjeTotal.ToString("F2"));
                summary.Add("HSJE", hsjeTotal.ToString("F2") + "</br>" + hsjeAll.ToString("F2"));
                summary.Add("BHSJE", bhsjeTotal.ToString("F2") + "</br>" + bhsjeAll.ToString("F2"));
                GridGoods.SummaryData = summary;
            }
            else
            {
                JObject summary = new JObject();
                summary.Add("GDNAME", "本页合计");
                summary.Add("SL", 0);
                summary.Add("LSJE", 0);
                summary.Add("HSJE", 0);
                summary.Add("BHSJE", 0);
                GridGoods.SummaryData = summary;
            }
        }
예제 #22
0
        protected override void billSearch()
        {
            int       total = 0;
            DataTable dt    = PubFunc.DbGetPage(GridList.PageIndex, GridList.PageSize, GetQuerySql(), ref total);

            GridList.DataSource  = dt;
            GridList.RecordCount = total;
            GridList.DataBind();
        }
예제 #23
0
        protected void btSearch_Click(object sender, EventArgs e)
        {
            if (dpkDATE1.SelectedDate == null || dpkDATE2.SelectedDate == null)
            {
                Alert.Show("请输入条件【查询期间】!");
                return;
            }
            else if (dpkDATE1.SelectedDate > dpkDATE2.SelectedDate)
            {
                Alert.Show("开始日期大于结束日期,请重新输入!");
                return;
            }

            String sql    = @"SELECT A.RQSJ,f_getdeptname(A.DEPTID) DEPTNAME,B.GDSEQ,B.GDNAME,B.GDSPEC,f_getunitname(B.UNIT) UNITNAME,B.HSJJ,f_getproducername(B.PRODUCER) PRODUCERNAME,
                            A.SL,A.HSJE,A.PH,A.RQ_SC,A.YXQZ
                    FROM DAT_GOODSJXC A,DOC_GOODS B
                    WHERE A.RQSJ BETWEEN TO_DATE('{0}','YYYY-MM-DD') AND TO_DATE('{1}','YYYY-MM-DD')  + 1
                    AND A.GDSEQ = B.GDSEQ AND F_CHK_DATARANGE(A.DEPTID, '{2}') = 'Y'";
            String search = @" ";

            if (txbGDSEQ.Text.Trim().Length > 0)
            {
                search += String.Format(" AND (B.GDSEQ LIKE '%{0}%' OR B.GDNAME  LIKE '%{0}%' OR B.ZJM  LIKE '%{0}%' OR B.BAR3 LIKE '%{0}%')", txbGDSEQ.Text.Trim());
            }
            if (ddlDEPTID.SelectedValue.Length > 0)
            {
                search += String.Format(" AND A.DEPTID = '{0}'", ddlDEPTID.SelectedValue);
            }
            if (ddlGZ.SelectedValue.Length > 0)
            {
                search += String.Format(" AND B.ISGZ = '{0}'", ddlGZ.SelectedValue);
            }
            string sortField     = grdList.SortField;
            string sortDirection = grdList.SortDirection;

            sql = String.Format(sql + search + String.Format(" ORDER BY {0} {1}", sortField, sortDirection), dpkDATE1.Text, dpkDATE2.Text, UserAction.UserID);
            int       total  = 0;
            DataTable dtData = PubFunc.DbGetPage(grdList.PageIndex, grdList.PageSize, sql, ref total);

            grdList.RecordCount = total;
            grdList.DataSource  = dtData;
            grdList.DataBind();

            Double donateTotal = 0, feeTotal = 0;

            foreach (DataRow row in dtData.Rows)
            {
                donateTotal += Convert.ToInt32(row["SL"]);
                feeTotal    += Convert.ToInt32(row["HSJE"]);
            }
            JObject summary = new JObject();

            summary.Add("GDNAME", "本页合计");
            summary.Add("SL", donateTotal.ToString("F2"));
            summary.Add("HSJE", feeTotal.ToString("F2"));
            grdList.SummaryData = summary;
        }
예제 #24
0
        public void DataSearch()
        {
            int    total = 0;
            string sql   = "SELECT PH.*,F_GETHISINFO(SP.GDSEQ,'GDNAME') GDNAME FROM DOC_GOODSPH PH,DOC_GOODS SP WHERE PH.GDSEQ=SP.GDSEQ AND (sp.gdname LIKE '%{0}%' OR sp.GDSEQ LIKE '%{0}%' OR PH.PH LIKE '%{0}%') ORDER BY PH.YXQZ";

            GridLot.DataSource  = PubFunc.DbGetPage(GridLot.PageIndex, GridLot.PageSize, string.Format(sql, trbSearch.Text), ref total);
            GridLot.RecordCount = total;
            GridLot.DataBind();
        }
예제 #25
0
        /// <summary>
        /// 获取商品数据信息
        /// </summary>
        /// <param name="pageNum">第几页</param>
        /// <param name="pageSize">每页显示天数</param>
        /// <param name="nvc">查询条件</param>
        /// <param name="total">总的条目数</param>
        /// <param name="errMsg"></param>
        /// <returns></returns>
        public DataTable GetGoodsList(int pageNum, int pageSize, NameValueCollection nvc, ref int total, ref string errMsg)
        {
            string strSearch = "";

            if (nvc != null)
            {
                foreach (string key in nvc)
                {
                    string condition = nvc[key];
                    if (!string.IsNullOrEmpty(condition))
                    {
                        switch (key.ToUpper())
                        {
                        case "SEQ":
                            strSearch += string.Format(" AND sp.GDSEQ='{0}'", condition);
                            break;

                        case "CATID0":
                            strSearch += string.Format(" AND sp.CATID0='{0}'", condition);
                            break;

                        case "FLAG":
                            strSearch += string.Format(" AND sp.FLAG='{0}'", condition);
                            break;

                        case "CX":
                            strSearch += string.Format(" AND (sp.GDSEQ LIKE '%{0}%' OR sp.GDNAME LIKE '%{0}%' OR sp.HISCODE LIKE '%{0}%' OR sp.HISNAME LIKE '%{0}%' OR sp.BARCODE  LIKE '%{0}%' OR  sp.BAR3 LIKE '%{0}%' OR sp.ZJM  LIKE '%{0}%' OR F_GETPRODUCERNAME(SP.PRODUCER) LIKE '%{0}%')", condition.ToUpper());
                            break;
                        }
                    }
                }
            }
            if (!string.IsNullOrWhiteSpace(srhISFLAG7.SelectedValue))
            {
                strSearch += string.Format(" AND sp.ISFLAG7 = '{0}'", srhISFLAG7.SelectedValue);
            }
            string strSql = @"SELECT ' '||SP.GDSEQ GDSEQ,SP.GDID,F_GETHISINFO(SP.GDSEQ,'GDNAME') GDNAME,SP.BARCODE,E.NAME CATID0NAME,B.NAME CATID0NAME_F,F_GETHISINFO(SP.GDSEQ,'GDSPEC') GDSPEC,D.NAME UNITNAME,SP.BZHL,
                               ROUND(SP.HSJJ,4) HSJJ,ROUND(SP.LSJ,4) LSJ,C.SUPNAME,SP.ZPBH,S.NAME FLAG_CN,SP.PIZNO,F_GETPRODUCERNAME(SP.PRODUCER) PRODUCERNAME,decode(sp.isflag7,'Y','是','否') ISNEW_CN
                          from DOC_GOODS SP,
                               SYS_CATEGORY B,
                               DOC_SUPPLIER C,
                               DOC_GOODSUNIT D,
                               doc_goodstype e,
                               (SELECT CODE, NAME FROM SYS_CODEVALUE WHERE TYPE = 'GOODS_STATUS') S
                         WHERE SP.CATID=B.CODE(+) AND SP.FLAG=S.CODE AND SP.SUPPLIER=C.SUPID(+) AND SP.UNIT = D.CODE(+) and SP.CATID0 = e.code(+) ";

            if (!string.IsNullOrWhiteSpace(strSearch))
            {
                strSql = strSql + strSearch + " order by SP.gdseq";
            }
            else
            {
                strSql = strSql + " order by SP.gdseq";
            }

            return(PubFunc.DbGetPage(pageNum, pageSize, strSql, ref total));
        }
예제 #26
0
        private void DataSearch()
        {
            int total = 0;

            DataTable dtData = PubFunc.DbGetPage(GridGoods.PageIndex, GridGoods.PageSize, GetSearchSql(), ref total);

            GridGoods.RecordCount = total;
            GridGoods.DataSource  = dtData;
            GridGoods.DataBind();
            //计算合计数量
            if (dtData != null && dtData.Rows.Count > 0)
            {
                decimal ZQCSLTotal = 0, ZQCHSJETotal = 0, ZTJTotal = 0, CGRKTotal = 0, CGRKHSJETotal = 0, THCKTotal = 0, THCKHSJETotal = 0;
                decimal KSXHTotal = 0, KSXHHSJETotal = 0, ZSYTotal = 0, ZSYHSJETotal = 0, KFKCSLTotal = 0, KFKCHSJETotal = 0, QMKCSLTotal = 0, QMKCHSJETotal = 0;


                foreach (DataRow row in dtData.Rows)
                {
                    THCKTotal     += Convert.ToDecimal(row["THCK"] ?? "0");
                    THCKHSJETotal += Convert.ToDecimal(row["THCKHSJE"] ?? "0");
                    ZQCSLTotal    += Convert.ToDecimal(row["ZQCSL"] ?? "0");
                    ZQCHSJETotal  += Convert.ToDecimal(row["ZQCHSJE"] ?? "0");
                    CGRKTotal     += Convert.ToDecimal(row["CGRK"] ?? "0");
                    CGRKHSJETotal += Convert.ToDecimal(row["CGRKHSJE"] ?? "0");

                    KSXHTotal     += Convert.ToDecimal(row["KSXH"] ?? "0");
                    KSXHHSJETotal += Convert.ToDecimal(row["KSXHHSJE"] ?? "0");
                    KFKCSLTotal   += Convert.ToDecimal(row["KFKCSL"] ?? "0");
                    KFKCHSJETotal += Convert.ToDecimal(row["KFKCHSJE"] ?? "0");
                    ZSYTotal      += Convert.ToDecimal(row["ZSY"] ?? "0");
                    ZSYHSJETotal  += Convert.ToDecimal(row["ZSYHSJE"] ?? "0");
                    ZTJTotal      += Convert.ToDecimal(row["ZTJ"] ?? "0");
                    QMKCSLTotal   += Convert.ToDecimal(row["QMKCSL"] ?? "0");
                    QMKCHSJETotal += Convert.ToDecimal(row["QMKCHSJE"] ?? "0");
                }
                JObject summary = new JObject();

                summary.Add("GDNAME", "本页合计");
                summary.Add("THCK", THCKTotal);
                summary.Add("THCKHSJE", THCKHSJETotal.ToString("F2"));
                summary.Add("ZQCSL", ZQCSLTotal);
                summary.Add("ZQCHSJE", ZQCHSJETotal.ToString("F2"));
                summary.Add("CGRK", CGRKTotal);
                summary.Add("CGRKHSJE", CGRKHSJETotal.ToString("F2"));

                summary.Add("KSXH", KSXHTotal);
                summary.Add("KSXHHSJE", KSXHHSJETotal.ToString("F2"));
                summary.Add("KFKCSL", KFKCSLTotal);
                summary.Add("KFKCHSJE", KFKCHSJETotal.ToString("F2"));
                summary.Add("ZSY", ZSYTotal);
                summary.Add("ZSYHSJE", ZSYHSJETotal.ToString("F2"));
                summary.Add("ZTJ", ZTJTotal);
                summary.Add("QMKCSL", QMKCSLTotal);
                summary.Add("QMKCHSJE", QMKCHSJETotal.ToString("F2"));
                GridGoods.SummaryData = summary;
            }
        }
예제 #27
0
        private void dataSearch()
        {
            int       total  = 0;
            DataTable dtData = PubFunc.DbGetPage(GridGoods.PageIndex, GridGoods.PageSize, GetSql(), ref total);

            GridGoods.RecordCount = total;
            GridGoods.DataSource  = dtData;
            GridGoods.DataBind();
        }
예제 #28
0
        protected void btnSearch()
        {
            string    strSQL = "SELECT SYSNAME,VERSION,UPTDATE,TO_CHAR(UPTMEMO) UPTMEMO,f_getusername(UPTPER) UPTPER, f_getusername(TESTPER) TESTPER,f_getusername(checkper) checkper FROM SYS_VERSION WHERE FLAG = 'Y' ORDER BY uptdate DESC";
            int       total  = 0;
            DataTable dt     = PubFunc.DbGetPage(GridList.PageIndex, GridList.PageSize, strSQL, ref total);

            GridList.DataSource  = dt;
            GridList.RecordCount = total;
            GridList.DataBind();
        }
예제 #29
0
        private void DataSearch2()
        {
            int       total  = 0;
            DataTable dtData = PubFunc.DbGetPage(GridCom.PageIndex, GridCom.PageSize, GetSearchSql2(), ref total);

            OutputSummaryData1(dtData);
            GridCom.RecordCount = total;
            GridCom.DataSource  = dtData;
            GridCom.DataBind();
        }
예제 #30
0
        private void DataQuery()
        {
            if (lstSCRQ1.SelectedDate == null || lstSCRQ2.SelectedDate == null)
            {
                Alert.Show("请输入条件【查询日期】!");
                return;
            }
            else if (lstSCRQ1.SelectedDate > lstSCRQ2.SelectedDate)
            {
                Alert.Show("开始日期大于结束日期,请重新输入!");
                return;
            }

            //string sql = "select A.*,B.DONAME from DAT_DO_LIST A,DAT_DO_TYPE B WHERE A.DOTYPE=B.DOTYPE ";
            string sql   = @"select A.*,
                                   f_getroleid(a.rolelist) ROLELISTNAME,
                                   B.DONAME,
                                   (case A.Flag
                                     when 'Y' then
                                      '信息已处理,不显示'
                                     when 'N' then
                                      '信息未处理,显示'
                                     else
                                      '维护信息'
                                   end) FLAGNAME,
                                   f_getusername(A.USERID) USERNAME,
                                   f_getusername(A.DOUSER) DOUSERNAME,
                                   C.FUNCNAME
                              from DAT_DO_LIST A, DAT_DO_TYPE B, SYS_FUNCTION C
                             WHERE A.DOTYPE = B.DOTYPE
                               AND A.FUNCID = C.FUNCID(+) ";
            int    total = 0;

            if (lstDOTYPE.SelectedItem != null && lstDOTYPE.SelectedItem.Value.Length > 0)
            {
                sql += string.Format(" AND A.DOTYPE='{0}'", lstDOTYPE.SelectedItem.Value);
            }
            if (lstFLAG.SelectedItem != null && lstFLAG.SelectedItem.Value.Length > 0)
            {
                sql += string.Format(" AND A.FLAG='{0}'", lstFLAG.SelectedItem.Value);
            }


            sql += string.Format(" AND a.scrq>=TO_DATE('{0}','yyyy-mm-dd hh24:mi:ss')", lstSCRQ1.SelectedDate);
            sql += string.Format(" AND a.scrq <=TO_DATE('{0}','yyyy-mm-dd hh24:mi:ss')+1 ", lstSCRQ2.SelectedDate);
            //  sql += string.Format("  AND F_CHK_ROLELIST(B.ROLELIST, '{0}') = 'Y'" , UserAction.UserRole);


            sql += " ORDER BY A.SCRQ DESC";

            GridList.DataSource  = PubFunc.DbGetPage(GridList.PageIndex, GridList.PageSize, sql, ref total);
            GridList.RecordCount = total;
            GridList.DataBind();
        }