Example #1
0
        private void GoodsTypeQuery()
        {
            string sql = "SELECT CODE,NAME,f_getalluser(STR1) STR1,f_getdeptname(STR2) STR2NAME,STR2 FROM DOC_GOODSTYPE ";

            if (tgbSearch.Text.Trim() != "")
            {
                sql += string.Format(" WHERE CODE LIKE '%{0}%' OR NAME LIKE '%{0}%'", tgbSearch.Text.Trim());
            }
            int total = 0;

            GridGoodsType.DataSource  = PubFunc.DbGetPage(GridGoodsType.PageIndex, GridGoodsType.PageSize, sql, ref total);
            GridGoodsType.RecordCount = total;
            GridGoodsType.DataBind();
        }
Example #2
0
 private void InitFrom(String strCode)
 {
     if (strCode == "")
     {
         PubFunc.FormDataClear(FormMx);
         ddlSJCODE.SelectedValue = "";
         tbxCode.Enabled         = true;
     }
     else
     {
         PubFunc.FormDataSet(FormMx, DbHelperOra.Query(SqlMx.Replace("@CODE", strCode)).Tables[0].Rows[0]);
         tbxCode.Enabled = false;
     }
 }
Example #3
0
        protected void GridProducer_RowDoubleClick(object sender, FineUIPro.GridRowClickEventArgs e)
        {
            hfdIsNew.Text   = "N";
            tbxCODE.Enabled = false;
            string strCode = GridProducer.Rows[e.RowIndex].Values[0].ToString();
            string strSql  = string.Format("select * from DOC_PRODUCER where CODE='{0}'", strCode);

            DataTable dtProducer = DbHelperOra.Query(strSql).Tables[0];

            if (dtProducer.Rows.Count > 0)
            {
                PubFunc.FormDataSet(FormProducer, dtProducer.Rows[0]);
            }
        }
Example #4
0
        protected void GridSupplier_RowDoubleClick(object sender, GridRowClickEventArgs e)
        {
            tbxCODE.Enabled = false;
            hfdIsNew.Text   = "N";
            string strCode = GridSupplier.Rows[e.RowIndex].Values[1].ToString();
            string strSql  = string.Format("select * from doc_license where code='{0}'", strCode);

            DataTable dtProducer = DbHelperOra.Query(strSql).Tables[0];

            if (dtProducer.Rows.Count > 0)
            {
                PubFunc.FormDataSet(FormProducer, dtProducer.Rows[0]);
            }
        }
Example #5
0
        protected override void billOpen(string strBillno)
        {
            string    StrSql = strDocSql + " AND A.SEQNO = '{0}'";
            DataTable dtDoc  = DbHelperOra.Query(string.Format(StrSql, strBillno)).Tables[0];

            PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);
            PageContext.RegisterStartupScript(GridGoods.GetRejectChangesReference());
            DataTable dtBill = DbHelperOra.Query(string.Format(strComSql, strBillno)).Tables[0];

            if (dtBill != null && dtBill.Rows.Count > 0)
            {
                Doc.GridRowAdd(GridGoods, dtBill);
            }
            PubFunc.FormLock(FormDoc, true, "");
            TabStrip1.ActiveTabIndex = 1;
            if (docFLAG.SelectedValue == "M")
            {
                //初始化按钮
                btnDel.Enabled    = true;
                btnSave.Enabled   = true;
                btnAudit.Enabled  = false;
                btnDelRow.Enabled = true;
                btnGoods.Enabled  = true;
                docMEMO.Enabled   = true;
                tbxREASON.Enabled = true;
                btnPrint.Enabled  = false;
                ButSubmit.Enabled = true;
            }
            else if (docFLAG.SelectedValue == "N")
            {
                btnDel.Enabled    = false;
                btnSave.Enabled   = false;
                btnAudit.Enabled  = true;
                btnDelRow.Enabled = false;
                btnGoods.Enabled  = false;
                btnPrint.Enabled  = false;
                ButSubmit.Enabled = false;
            }
            else if (docFLAG.SelectedValue == "Y")
            {
                //初始化按钮
                btnDel.Enabled    = false;
                btnSave.Enabled   = false;
                btnAudit.Enabled  = false;
                btnDelRow.Enabled = false;
                btnGoods.Enabled  = false;
                btnPrint.Enabled  = true;
                ButSubmit.Enabled = false;
            }
        }
Example #6
0
 protected override void billNew()
 {
     GridGoods.DataSource = null;
     GridGoods.DataBind();
     PubFunc.FormLock(FormDoc, false);
     docSEQNO.Text     = string.Empty;
     docSEQNO.Enabled  = false;
     docFLAG.Enabled   = false;
     docLRY.Enabled    = false;
     tbxYJJJ.Enabled   = false;
     btnCreate.Enabled = true;
     tbxMEMO.Text      = string.Empty;
     tbxYJJJ.Text      = string.Empty;
 }
Example #7
0
        protected void GridList_Sort(object sender, GridSortEventArgs e)
        {
            GridList.SortDirection  = e.SortDirection;
            GridList.SortField      = e.SortField;
            highlightRows.Text      = "";
            highlightRowYellow.Text = "";
            highlightRowRed.Text    = "";
            DataTable table = PubFunc.GridDataGet(GridList);
            DataView  view1 = table.DefaultView;

            view1.Sort          = String.Format("{0} {1}", GridList.SortField, GridList.SortDirection);
            GridList.DataSource = view1;
            GridList.DataBind();
        }
Example #8
0
 protected override void billCancel()
 {
     if (ddlFLAG.SelectedValue != "N")
     {
         Alert.Show("非【已提交】单据不能驳回!", "消息提示", MessageBoxIcon.Warning);
         return;
     }
     if (PubFunc.StrIsEmpty(tbxBILLNO.Text))
     {
         Alert.Show("请选择需要驳回的单据");
         return;
     }
     WindowReject.Hidden = false;
 }
Example #9
0
 protected void btnExport_Click(object sender, EventArgs e)
 {
     if (GridGoods.Rows.Count < 1)
     {
         Alert.Show("没有数据,无法导出!");
         return;
     }
     Response.ClearContent();
     Response.AddHeader("content-disposition", "attachment; filename=信息导出.xls");
     Response.ContentType = "application/excel";
     Response.Write(PubFunc.GridToHtml(GridGoods));
     Response.End();
     btnExport.Enabled = true;
 }
Example #10
0
        public MoveSetting()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            // TODO: Add any initialization after the InitializeComponent call
            if (PubFunc.IsInDesignMode())
            {
                return;
            }
            bool isVisible = (!PubFunc.IsFhzl3D() && !SPrinterProperty.IsSimpleUV() && (PubFunc.GetUserPermission() == (int)UserPermission.SupperUser)) || PubFunc.IsZhuoZhan();

            button4Up.Visible = button4Down.Visible = label1.Visible = m_ComboBox4speed.Visible = isVisible;
        }
Example #11
0
 protected override void billAddRow()
 {
     if ((",M,R").IndexOf(docFLAG.SelectedValue) < 0)
     {
         Alert.Show("非『新增』单据不能增行!", "消息提示", MessageBoxIcon.Warning);
         return;
     }
     if (PubFunc.FormDataCheck(FormDoc).Length > 1)
     {
         return;
     }
     billLockDoc(true);
     PubFunc.GridRowAdd(GridGoods, "INIT");
 }
Example #12
0
        protected void GridList_RowDoubleClick(object sender, GridRowClickEventArgs e)
        {
            if (GridList.SelectedRowIndexArray.Length < 1)
            {
                return;
            }
            int rowIndex = GridList.SelectedRowIndexArray[0];
            //表头赋值
            string    strSql = "select * from dat_jsd_fp where SEQNO = {0}";
            DataTable dtDoc  = DbHelperOra.Query(string.Format(strSql, GridList.DataKeys[rowIndex][1])).Tables[0];

            PubFunc.FormDataSet(Formlist, dtDoc.Rows[0]);
            lstSEQNO.Enabled = false;
        }
Example #13
0
        private void dataSearch()
        {
            if (string.IsNullOrWhiteSpace(tbxJHYF.Text))
            {
                Alert.Show("【计划月份】不能为空,请选择!");
                return;
            }
            string strSql = "";

            if (hfdoper.Text.Equals("input"))
            {
                strSql = @"SELECT decode(t.flag,'M','新单','N','已提交','Y','已审核','R','已驳回') flag,t.BILLNO,t.BILLTYPE,F_GETDEPTNAME(t.DEPTID) DEPTID,t.BEGINTIME,t.ENDTIME,t.XDRQ,t.SUBNUM,t.SUBSUM,F_GETUSERNAME(t.CGY) CGY,F_GETUSERNAME(t.LRY) LRY,t.LRRQ,F_GETUSERNAME(t.SHR) SHR,t.SPRQ,t.MEMO FROM DAT_DDPLAN_DOC t where BILLTYPE='CJD' AND t.flag IN ('M','N','R','Y')";
            }
            if (hfdoper.Text.Equals("audit"))
            {
                strSql = @"SELECT decode(t.flag,'M','新单','N','已提交','Y','已审核','R','已驳回') flag,t.BILLNO,t.BILLTYPE,F_GETDEPTNAME(t.DEPTID) DEPTID,t.BEGINTIME,t.ENDTIME,t.XDRQ,t.SUBNUM,t.SUBSUM,F_GETUSERNAME(t.CGY) CGY,F_GETUSERNAME(t.LRY) LRY,t.LRRQ,F_GETUSERNAME(t.SHR) SHR,t.SHRQ,t.MEMO FROM DAT_DDPLAN_DOC t where BILLTYPE='CJD' AND t.flag in ('N','Y','R')";
            }

            string strSearch = "";

            if (lstBILLNO.Text.Length > 0)
            {
                strSearch += string.Format(" AND t.BILLNO  LIKE '%{0}%'", lstBILLNO.Text);
            }
            if (lstFLAG.SelectedItem != null && lstFLAG.SelectedItem.Value.Length > 0)
            {
                strSearch += string.Format(" AND t.FLAG='{0}'", lstFLAG.SelectedItem.Value);
            }
            if (lstDEPTID.SelectedValue != null && lstDEPTID.SelectedValue.Length > 0)
            {
                strSearch += string.Format(" AND t.DEPTID='{0}'", lstDEPTID.SelectedValue);
            }
            strSearch += string.Format(" AND TO_CHAR(t.XDRQ,'YYYY-MM')=TO_CHAR(TO_DATE('{0}','YYYY-MM-DD'),'YYYY-MM')", tbxJHYF.Text + "-01");
            // strSearch += string.Format(" AND t.XDRQ <TO_DATE('{0}','YYYY-MM-DD') + 1", lstENDRQ.ToString("yyyy-MM-dd"));

            strSearch += string.Format(" AND t.deptid in( select code FROM SYS_DEPT where F_CHK_DATARANGE(CODE, '{0}') = 'Y' )", UserAction.UserID);

            if (!string.IsNullOrWhiteSpace(strSearch))
            {
                strSql += strSearch;
            }
            strSql += " ORDER BY decode(flag,'新单','1','已提交','2','已驳回','3','4'),t.XDRQ DESC";
            int       total = 0;
            DataTable dt    = PubFunc.DbGetPage(GridList.PageIndex, GridList.PageSize, strSql, ref total);

            GridList.DataSource  = dt;
            GridList.RecordCount = total;
            GridList.DataBind();
        }
Example #14
0
        private string GetSearchSql()
        {
            string strSql   = @"SELECT D.DEPTID,f_getdeptname(D.DEPTID) DEPTIDNAME,NVL(A.QCKC,0) QCKC,NVL(A.QMKC,0) QMKC,B.GDSEQ,B.GDNAME,B.GDSPEC,f_getunitname(B.UNIT) UNITNAME,f_getproducername(B.PRODUCER) PRODUCERNAME,B.HSJJ,B.PIZNO,
                            (CASE WHEN NVL(A.QCKC,0)+ NVL(A.QMKC,0) = 0 THEN 0 ELSE ROUND(NVL(C.SYSL,0)/(NVL(A.QCKC,0)+NVL(A.QMKC,0))*2,2) END) ZZL1,
                            (CASE WHEN NVL(C.SYSL,0) = 0 THEN 0 ELSE ROUND(360*(A.QCKC+A.QMKC)/2/C.SYSL,0) END) ZZL2,
                            NVL(E.KCSL,0) KCSL
                        FROM (SELECT A.DEPTID,A.GDSEQ,SUM(DECODE(TO_CHAR(A.RQ,'YYYY-MM-DD'),TO_CHAR(TO_DATE('{0}', 'yyyy-MM-dd')-1, 'YYYY-MM-DD'),A.KCSL,0)) QCKC ,SUM(DECODE(TO_CHAR(A.RQ,'YYYY-MM-DD'),TO_CHAR(TO_DATE('{1}', 'yyyy-MM-dd') - 1,'YYYY-MM-DD'),A.KCSL,0)) QMKC 
                        FROM V_STOCKALL A
                        WHERE --TO_CHAR(A.RQ,'YYYY-MM-DD') = '{0}' OR TO_CHAR(A.RQ,'YYYY-MM-DD') = '{1}'
                            A.RQ BETWEEN TO_DATE('{0}', 'yyyy-MM-dd')-1 and TO_DATE('{1}', 'yyyy-MM-dd')
                        GROUP BY A.DEPTID,A.GDSEQ) A,DOC_GOODS B,
                        (SELECT A.GDSEQ,A.DEPTID,ABS(SUM(A.SL)) SYSL
                        FROM DAT_GOODSJXC A
                        WHERE A.KCADD = -1 AND A.BILLTYPE NOT IN('RKD','SYD') AND A.RQSJ BETWEEN TO_DATE('{0}','yyyy-MM-dd') AND TO_DATE('{1}','yyyy-MM-dd')
                        GROUP BY A.GDSEQ,A.DEPTID) C,DOC_GOODSCFG D,
                        (SELECT DEPTID,GDSEQ,SUM(KCSL) KCSL
                        FROM DAT_GOODSSTOCK
                        WHERE KCSL > 0
                        GROUP BY DEPTID,GDSEQ) E
                        WHERE D.GDSEQ = A.GDSEQ(+) AND D.GDSEQ = C.GDSEQ(+) AND D.GDSEQ = B.GDSEQ AND D.GDSEQ = E.GDSEQ(+) AND D.DEPTID = A.DEPTID(+) AND D.DEPTID = C.DEPTID(+) AND D.DEPTID = E.DEPTID(+)";
            string strWhere = " ";

            if (!PubFunc.StrIsEmpty(ddlDEPTID.SelectedValue))
            {
                strWhere += " AND A.DEPTID = '" + ddlDEPTID.SelectedValue + "'";
            }

            if (!PubFunc.StrIsEmpty(ddlCATID.SelectedValue))
            {
                strWhere += " AND B.CATID0 = '" + ddlCATID.SelectedValue + "'";
            }

            if (!PubFunc.StrIsEmpty(ddlISGZ.SelectedValue))
            {
                strWhere += " and B.ISGZ = '" + ddlISGZ.SelectedValue + "'";
            }

            if (!PubFunc.StrIsEmpty(tbxGOODS.Text))
            {
                strWhere += " AND (UPPER(B.GDSEQ) LIKE '%" + tbxGOODS.Text.ToUpper() + "%' OR UPPER(B.ZJM) LIKE '%" + tbxGOODS.Text.ToUpper() + "%' OR UPPER(B.GDNAME) LIKE '%" + tbxGOODS.Text.ToUpper() + "%')";
            }
            if (strWhere != " ")
            {
                strSql = strSql + strWhere;
            }

            strSql = string.Format(strSql, lstLRRQ1.Text, Convert.ToDateTime(lstLRRQ2.Text).AddDays(1).ToString("yyyy-MM-dd")) + string.Format(" ORDER BY {0} {1}", GridList.SortField, GridList.SortDirection);
            return(strSql);
        }
Example #15
0
        protected override void billAudit()
        {
            if (Doc.DbGetSysPara("LOCKSTOCK") == "Y")
            {
                Alert.Show("系统库存已被锁定,请等待物资管理科结存处理完毕再做审核处理!", "消息提醒", MessageBoxIcon.Warning);
                return;
            }

            if (docFLAG.SelectedValue != "N")
            {
                Alert.Show("非新单不能审核!");
                return;
            }
            SaveSuccess = false;
            save("Y");
            if (SaveSuccess == false)
            {
                return;
            }
            SaveSuccess = false;
            string sql       = @"SELECT WMSYS.WM_CONCAT(BARCODE)
                             FROM (SELECT B.BARCODE
                                     FROM DAT_XS_COM A, DAT_GOODSDS_LOG B
                                    WHERE A.STR1 = B.BARCODE
                                      AND B.FLAG <> 'N'
                                      AND A.SEQNO = '{0}'
                                   UNION ALL
                                   SELECT B.BARCODE
                                     FROM DAT_XS_COM A, DAT_CK_BARCODE B
                                    WHERE A.STR1 = B.BARCODE
                                      AND B.FLAG <> 'N'
                                      AND A.SEQNO = '{0}')";
            string strBillno = (DbHelperOra.GetSingle(string.Format(sql, docSEQNO.Text)) ?? "").ToString();

            //增加条码状态验证
            if (!PubFunc.StrIsEmpty(strBillno))
            {
                Alert.Show("条码【" + strBillno + "】已被回收或退货", "提示信息", MessageBoxIcon.Warning);
                return;
            }
            strBillno = docSEQNO.Text;
            if (BillOper(strBillno, "AUDIT") == 1)
            {
                billLockDoc(true);
                Alert.Show("单据【" + strBillno + "】审核成功!");
                OperLog("条码回收", "审核单据【" + docBILLNO.Text + "】");
                billOpen(strBillno);
            }
        }
Example #16
0
        protected override void billNew()
        {
            //原单据保存判断
            string strDeptID  = docDEPTID.SelectedValue;
            string strDeptOUT = docDEPTOUT.SelectedValue;

            PubFunc.FormDataClear(FormDoc);

            docFLAG.SelectedValue    = "N";
            docLRY.SelectedValue     = UserAction.UserID;
            docSLR.SelectedValue     = UserAction.UserID;
            docLRRQ.SelectedDate     = DateTime.Now;
            docXSRQ.SelectedDate     = DateTime.Now;
            docDEPTID.SelectedValue  = strDeptID;
            docDEPTOUT.SelectedValue = strDeptOUT;
            billLockDoc(false);
            docMEMO.Enabled    = true;
            docDEPTOUT.Enabled = true;
            docSLR.Enabled     = true;
            //清空Grid行
            PageContext.RegisterStartupScript(GridGoods.GetRejectChangesReference());
            btnDel.Enabled     = false;
            btnSave.Enabled    = true;
            btnAudit.Enabled   = false;
            btnCancel.Enabled  = false;
            btnPrt.Enabled     = false;
            btnPrint.Enabled   = false;
            btnDelRow.Enabled  = true;
            btnGoods.Enabled   = true;
            trbBARCODE.Enabled = true;

            if (Request.QueryString["tp"] != null && Request.QueryString["tp"].ToString().Trim().Length > 0)
            {
                docDEPTOUT.SelectedValue = DbHelperOra.GetSingle("SELECT T.STR2 FROM DOC_GOODSTYPE T WHERE T.CODE=" + Request.QueryString["tp"].ToString()).ToString();
            }
            else
            {
                docDEPTOUT.SelectedValue = DbHelperOra.GetSingle("SELECT T.STR2 FROM DOC_GOODSTYPE T WHERE T.CODE='2'").ToString();
            }

            //计算合计数量
            JObject summary = new JObject();

            summary.Add("GDNAME", "本页合计");
            summary.Add("BZSL", "0");
            summary.Add("HSJE", "0");
            summary.Add("DHSL", "0");
            GridGoods.SummaryData = summary;
        }
Example #17
0
        protected void billSearch()
        {
            if (lstLRRQ1.SelectedDate == null || lstLRRQ2.SelectedDate == null)
            {
                Alert.Show("请输入条件【使用时间】!");
                return;
            }
            else if (lstLRRQ1.SelectedDate > lstLRRQ2.SelectedDate)
            {
                Alert.Show("【开始日期】大于【结束日期】,请重新输入!");
                return;
            }

            string strSql    = @"SELECT A.*,F_GETUSERNAME(A.OPERUSER) USERNAME,G.GDNAME,F_GETSUPNAME(A.SUPID) SUPNAME,
                                     DECODE(A.FLAG,'N','新生成','Y','已下单','已完成') FLAG_CN,F_GETUSERNAME(A.ORDUSER) ORDUSERNAME,
                                     F_GETUNITNAME(G.UNIT) UNIT FROM DAT_USE_DET A,DOC_GOODS G WHERE A.GDSEQ=G.GDSEQ ";
            string strSearch = "";

            strSearch += string.Format(" AND A.USERTIME>=TO_DATE('{0}','YYYY-MM-DD')", lstLRRQ1.Text);
            strSearch += string.Format(" AND A.USERTIME <TO_DATE('{0}','YYYY-MM-DD') + 1", lstLRRQ2.Text);
            if (tbxBILLNO.Text.Trim().Length > 0)
            {
                strSearch += string.Format(" AND (A.BILLNO  LIKE '%{0}%' OR A.GDSEQ  LIKE '%{0}%' OR G.GDNAME  LIKE '%{0}%')", tbxBILLNO.Text.Trim());
            }
            if (lstFLAG.SelectedItem != null && lstFLAG.SelectedItem.Value.Length > 0)
            {
                strSearch += string.Format(" AND A.FLAG  = '{0}'", lstFLAG.SelectedItem.Value);
            }
            if (lstLRY.SelectedItem != null && lstLRY.SelectedItem.Value.Length > 0)
            {//判断使用人
                strSearch += string.Format(" AND A.OPERUSER  LIKE '%{0}%'", lstLRY.SelectedItem.Value);
            }
            if (lstDEPTID.SelectedItem != null && lstDEPTID.SelectedItem.Value.Length > 0)
            {//判断部门
                strSearch += string.Format(" AND A.DEPTID  LIKE '%{0}%'", lstDEPTID.SelectedItem.Value);
            }
            if (lstSUPID.SelectedItem != null && lstSUPID.SelectedItem.Value.Length > 0)
            {//判断供应商
                strSearch += string.Format(" AND A.SUPID  LIKE '%{0}%'", lstSUPID.SelectedItem.Value);
            }
            strSql += strSearch;

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

            GridList.DataSource  = dt;
            GridList.RecordCount = total;
            GridList.DataBind();
        }
Example #18
0
        private void DataSearch()
        {
            int    total     = 0;
            string strSearch = "";
            string sql       = "";

            if (DbHelperOra.Exists("SELECT 1 FROM DAT_YRK_EXT WHERE BILLNO IN(" + Billno() + ") AND NVL(STR1,'#') <> '#'"))
            {
                sql = String.Format(@"SELECT A.billno seqno,C.GDSEQ,C.GDNAME,C.GDSPEC,C.BZHL,C.UNIT,f_getunitname(C.UNIT) UNITNAME,1 SSSL,C.HSJJ,A.PH,
                        A.RQ_SC,A.YXQZ,C.PIZNO PZWH,C.PRODUCER,f_getproducername(C.PRODUCER) PRODUCERNAME,A.STR1,C.JXTAX,C.ISGZ
                    FROM DAT_YRK_EXT A,DOC_GOODS C
                    WHERE A.GDSEQ = C.GDSEQ AND A.BILLNO IN ({0}) AND NVL(A.STR1,'#') <>'#' AND C.FLAG IN('Y','T')
                    UNION ALL
                    SELECT A.billno,C.GDSEQ,C.GDNAME,C.GDSPEC,C.BZHL,C.UNIT,f_getunitname(C.UNIT) UNITNAME,COUNT(1) SSSL,C.HSJJ,A.PH,A.RQ_SC,A.YXQZ,C.PIZNO PZWH,C.PRODUCER,f_getproducername(C.PRODUCER) PRODUCERNAME,A.STR1,C.JXTAX,C.ISGZ
                    FROM DAT_YRK_EXT A,DOC_GOODS C
                    WHERE A.GDSEQ = C.GDSEQ AND A.BILLNO IN ({0}) AND NVL(A.STR1,'#') ='#' AND C.FLAG IN('Y','T')
                    GROUP BY C.GDSEQ,C.GDNAME,C.GDSPEC,C.BZHL,C.UNIT,C.HSJJ,A.PH,A.RQ_SC,A.YXQZ,C.PIZNO,C.PRODUCER,A.STR1,C.JXTAX,A.billno", Billno());
            }
            else
            {
                sql = string.Format(@"SELECT A.SEQNO,
                                        F_GETUNITNAME(C.UNIT) UNITNAME,
                                        F_GETPRODUCERNAME(C.PRODUCER) PRODUCERNAME,
                                        F_GETSUPNAME(b.supid) SUPNAME,
                                        F_GETSUPNAME(C.SUPPLIER) SUPPLIERNAME,B.HSJE,
                                        C.GDSEQ,C.GDNAME,C.GDSPEC,C.BZHL,C.HSJJ,C.ZPBH,'{1}' HWID,C.JXTAX,C.PIZNO PZWH,C.PRODUCER,b.supid,C.UNIT,B.SSSL,B.PH,B.RQ_SC,B.YXQZ,
                                        NVL(D.ISJF,'Y') ISJF,B.ISGZ
                            FROM DAT_YRK_DOC A, DAT_YRK_COM B , DOC_GOODS C,DOC_GOODSCFG D
                            WHERE A.SEQNO = B.SEQNO
                            AND B.GDSEQ = C.GDSEQ
                            AND D.GDSEQ=B.GDSEQ
                            AND A.DEPTID=D.DEPTID
                            AND A.SEQNO IN({0}) AND A.FLAG = 'Y' AND C.FLAG IN('Y','T')
                            AND EXISTS(SELECT 1 FROM DOC_GOODSCFG WHERE DEPTID = '{1}' AND GDSEQ = B.GDSEQ)", Billno(), docDEPTID.SelectedValue);
            }
            if (!string.IsNullOrWhiteSpace(trbSearch.Text))
            {
                strSearch = string.Format(" AND (C.GDSEQ LIKE '%{0}%' OR C.GDNAME LIKE '%{0}%' OR C.ZJM LIKE '%{0}%' OR C.BARCODE LIKE '%{0}%')", trbSearch.Text.ToUpper());
            }
            //strSearch += " ORDER BY B.ROWNO";
            sql += strSearch;

            StringBuilder strSql = new StringBuilder(sql);
            DataTable     dtData = PubFunc.DbGetPage(GoodsInfo.PageIndex, GoodsInfo.PageSize, strSql.ToString(), ref total);

            GoodsInfo.RecordCount = total;
            GoodsInfo.DataSource  = dtData;
            GoodsInfo.DataBind();
        }
Example #19
0
        private string GetSql()
        {
            string strSql   = @"SELECT A.DEPTID,
                                                   F_GETDEPTNAME(A.DEPTID) DEPTNAME,
                                                   A.GDSEQ,
                                                   A.CATID,
                                                   F_GETCATNAME(A.CATID) CATNAME,
                                                   B.GDNAME,
                                                   B.GDSPEC,
                                                   A.SUPID,
                                                   F_GETSUPNAME(A.SUPID) SUPNAME,
                                                   A.PZWH,
                                                   ROUND(SUM(A.SL), 4) SL,
                                                   ROUND(SUM(A.HSJE), 4) HSJE,
                                                   DECODE(B.ISGZ, 'Y', '是', '否') ISGZ
                                              FROM DAT_GOODSJXC A, DOC_GOODS B
                                             WHERE A.GDSEQ = B.GDSEQ ";
            string strWhere = "";

            strWhere += " AND A.RQSJ>=TO_DATE('" + dpkDATE1.Text + "','YYYY-MM-DD') AND  A.RQSJ< TO_DATE('" + dpkDATE2.Text + "','YYYY-MM-DD') +1 ";

            if (!PubFunc.StrIsEmpty(ddlSUPID.SelectedValue))
            {
                strWhere += " AND A.SUPID = '" + ddlSUPID.SelectedValue + "'";
            }
            if (!PubFunc.StrIsEmpty(ddlDEPTID.SelectedValue))
            {
                strWhere += " AND A.DEPTID = '" + ddlDEPTID.SelectedValue + "'";
            }
            if (!PubFunc.StrIsEmpty(txbGDSEQ.Text))
            {
                strWhere += " AND A.GDSEQ = '" + txbGDSEQ.Text + "'";
            }
            if (!PubFunc.StrIsEmpty(ddlISGZ.SelectedValue))
            {
                strWhere += " AND B.ISGZ = '" + ddlISGZ.SelectedValue + "'";
            }
            if (!PubFunc.StrIsEmpty(ddlInvoicType.SelectedValue))
            {
                strWhere += " AND A.KCADD = '" + ddlInvoicType.SelectedValue + "'";
            }
            strWhere += " GROUP BY A.GDSEQ,A.CATID,A.SUPID,A.PZWH,A.DEPTID,B.GDNAME,B.GDSPEC,ISGZ";
            strWhere += " ORDER BY A.GDSEQ ASC";
            if (strWhere.Trim().Length > 0)
            {
                strSql = strSql + strWhere;
            }
            return(strSql);
        }
Example #20
0
        public void OnPrinterSettingChange(AllParam allParam)
        {
            try
            {
                SPrinterSetting ss            = allParam.PrinterSetting;
                EpsonExAllParam epsonAllparam = allParam.EpsonAllParam;

                if (allParam.PrinterProperty.EPSONLCD_DEFINED)
                {
                    m_epsonBaseSetting.OnPrinterSettingChange(ss, epsonAllparam);
                }
                else
                {
                    m_BaseSetting.OnPrinterSettingChange(ss);
                }

                m_BaseSetting.OnExtendedSettingsChange(allParam.ExtendedSettings);
                if (this.m_TabControlSetting.TabPages.Contains(this.m_TabPageCaliSetting))
                {
                    m_CalibrationSetting.OnPrinterSettingChange(allParam);
                }
                m_SeviceSetting.OnPrinterSettingChange(ss, epsonAllparam.sCaliConfig);
                m_SeviceSetting.OnServiceSettingChange(allParam.SeviceSetting, epsonAllparam.sCaliConfig);
                //m_RealTimeSetting.OnPrinterSettingChange(ss);
                m_MoveSetting.OnPrinterSettingChange(ss);
                spotColorSetting1.OnPrinterSettingChange(ss);
                spotColorSetting1.OnExtendedSettingsChange(allParam.ExtendedSettings);
                this.doublePrintSetting1.OnScorpionSettingsChanged(allParam.DoubleSidePrint);
                this.m_Printer3DSetting.OnPrinterSettingChange(allParam);
                this.userExtensionSetting.OnPrinterSettingChange(allParam);
                defineUVPowerLevel1.OnPrinterSettingChange(allParam);

                closeColorNozzle1.OnPrinterSettingChange(allParam);

                customCloseNozzle1.OnPrinterSettingChange(ss);
                if (SPrinterProperty.IsJianRui())
                {
                    workposSetting1.OnPrinterSettingChange(allParam.PrinterSetting);
                }
                if (PubFunc.SupportDebugQuality())
                {
                    debugQuality1.OnPrinterSettingChange(allParam);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #21
0
        private string GetSearchSql1()
        {
            //string strSql = @"SELECT B.GDSEQ,B.GDNAME,B.GDSPEC,F_GETUNITNAME(B.UNIT) UNIT,B.HSJJ,SUM(B.XSSL) SL,SUM(B.HSJE) JE,G.HISCODE
            //                           FROM DAT_CK_DOC A, DAT_CK_COM B, DOC_GOODS G
            //                          WHERE A.SEQNO = B.SEQNO AND B.GDSEQ = G.GDSEQ AND A.FLAG='Y' ";
            //string strWhere = " ";

            //if (!PubFunc.StrIsEmpty(trbSearch.Text)) strWhere += " and (G.GDSEQ like '%" + trbSearch.Text + "%' or g.zjm like '%" + trbSearch.Text + "%' or g.gdname like '%" + trbSearch.Text + "%')";

            //strWhere += string.Format(" and A.SHRQ>=TO_DATE('{0}','YYYY-MM-DD') and A.SHRQ < TO_DATE('{1}','YYYY-MM-DD')+1 ", dpkBegRQ.Text, dpkEndRQ.Text);
            //if (strWhere != " ") strSql = strSql + strWhere;

            //strSql += " GROUP BY B.GDSEQ, B.GDNAME, B.GDSPEC, B.UNIT, B.HSJJ, G.HISCODE";
            //return strSql;

            StringBuilder sbSql = new StringBuilder();

            sbSql.AppendFormat(@"SELECT B.GDSEQ,
                                                   B.GDNAME,
                                                   B.GDSPEC,
                                                   F_GETUNITNAME(B.UNIT) UNIT,
                                                   C.NAME CATTYPE,
                                                   B.HSJJ,B.HISCODE,
                                                   DECODE(B.ISCF,'Y','是','否') ISSF,
                                                   F_GETPRODUCERNAME(B.PRODUCER) PRODUCER,
                                                   (-SUM(DECODE(A.BILLTYPE,'XST',DECODE(A.KCADD,'1',A.SL,0),A.SL))) SL,
                                                   (-SUM(DECODE(A.BILLTYPE,'XST',DECODE(A.KCADD,'1',A.SL,0),A.SL) * A.HSJJ)) JE
                                              FROM DAT_GOODSJXC A, DOC_GOODS B, SYS_CATEGORY C
                                             WHERE A.GDSEQ = B.GDSEQ
                                               AND B.CATID = C.CODE
                                               AND A.BILLTYPE IN ('DSH','XSD','XSG','XST')
                                               AND A.RQSJ BETWEEN TO_DATE('{0}', 'YYYY-MM-DD') AND TO_DATE('{1}', 'YYYY-MM-DD') + 1
                                               AND B.CATID0='{2}'
                                               AND A.DEPTID IN (SELECT CODE FROM SYS_DEPT WHERE TYPE IN ('3', '4')) ", dpkBegRQ.Text, dpkEndRQ.Text, docDHLX1.SelectedValue);

            if (!PubFunc.StrIsEmpty(trbSearch.Text.Trim()))
            {
                sbSql.AppendFormat(" AND (A.GDSEQ='%{0}%' OR B.GDNAME LIKE '%{0}%'  OR B.GDSPEC LIKE '%{0}%' OR UPPER(B.ZJM) LIKE UPPER('%{0}%'))", trbSearch.Text.Trim());
            }
            sbSql.Append(@"   GROUP BY B.GDSEQ,
                                                        B.GDNAME,
                                                        B.GDSPEC,B.ISCF,
                                                        B.UNIT,
                                                        B.HSJJ,B.HISCODE,
                                                        C.NAME,
                                                        B.PRODUCER
                                             ORDER BY B.GDNAME,B.GDSPEC");
            return(sbSql.ToString());
        }
Example #22
0
        protected void cxsj(String strCode)
        {
            string strSql = string.Format("select * from DOC_SUPPLIER where SUPID='{0}'", strCode);

            DataTable dtProducer = DbHelperOra.Query(strSql).Tables[0];

            if (dtProducer.Rows.Count > 0)
            {
                PubFunc.FormDataSet(FormProducer, dtProducer.Rows[0]);
                tbxSUPPWD.Text = "";
                if (dtProducer.Rows[0]["STR1"].ToString() == "Y")
                {
                    chkSTR1.Checked = true;
                }
                else
                {
                    chkSTR1.Checked = false;
                }
            }

            if (ddlFLAG.SelectedValue == "Y")
            {
                PubFunc.FormLock(FormProducer, true);
                btnDelete.Enabled  = false;
                btnSave.Enabled    = false;
                btnAudit.Enabled   = false;
                btnUnAudit.Enabled = true;
            }
            else
            {
                PubFunc.FormLock(FormProducer, false);
                btnUnAudit.Enabled = false;
                btnAudit.Enabled   = true;
                btnDelete.Enabled  = true;
                tbxSUPID.Enabled   = false;
                btnSave.Enabled    = true;
                hfdIsNew.Text      = "N";
            }
            if (strCode == "00001" || strCode == "00002")
            {
                chkISDG.Enabled = false;
            }
            else
            {
                chkISDG.Enabled = true;
            }
            ddlFLAG.Enabled = false;
            chkSTR1.Enabled = false;
        }
Example #23
0
        protected override void billOpen(string strBillno)
        {
            DataTable dtDoc = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];

            PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);

            PageContext.RegisterStartupScript(GridGoods.GetRejectChangesReference());
            decimal   bzslTotal = 0, feeTotal = 0;
            DataTable dtBill = DbHelperOra.Query(string.Format(strComSql, strBillno)).Tables[0];

            if (dtBill != null && dtBill.Rows.Count > 0)
            {
                foreach (DataRow row in dtBill.Rows)
                {
                    bzslTotal += Convert.ToDecimal(row["BZSL"]);
                    feeTotal  += Convert.ToDecimal(row["HSJJ"]) * Convert.ToDecimal(row["BZSL"]);
                }
            }
            Doc.GridRowAdd(GridGoods, dtBill);
            //计算合计数量
            JObject summary = new JObject();

            summary.Add("GDNAME", "本页合计");
            summary.Add("BZSL", bzslTotal.ToString());
            summary.Add("HSJE", feeTotal.ToString("F2"));
            GridGoods.SummaryData = summary;
            PubFunc.FormLock(FormDoc, true, "");
            TabStrip1.ActiveTabIndex = 1;
            //判断按钮状态
            if (docFLAG.SelectedValue == "N")
            {
                tbxBARCODE.Enabled    = true;
                btnExtraction.Enabled = true;
                btnSave.Enabled       = true;
                btnAudit.Enabled      = true;
                btnPrint.Enabled      = false;
                btnDelRow.Enabled     = true;
                btnGoods.Enabled      = true;
            }
            else
            {
                btnExtraction.Enabled = false;
                btnSave.Enabled       = false;
                btnAudit.Enabled      = false;
                btnPrint.Enabled      = true;
                btnDelRow.Enabled     = false;
                btnGoods.Enabled      = false;
            }
        }
Example #24
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;
            string strSql   = @"SELECT 
	                        SUPID,
	                        F_GETPRODUCERNAME(SUPID) supname,
	                        F_GETDEPTNAME(DEPTID) DEPTNAME ,
	                        DECODE(KCADD,1,'增库存','减库存') KCADD,
	                        round(sum(SL),4)      SL ,
	                        round(sum(LSJE),4)    LSJE,
	                        round(sum(HSJE),4)    HSJE,
	                        round(sum(BHSJE),4)  BHSJE 
                        FROM DAT_GOODSJXC where 1=1 ";
            string strWhere = "";

            strWhere += " AND RQSJ>=TO_DATE('" + dpkDATE1.Text + "','YYYY/MM/DD') AND  RQSJ< TO_DATE('" + dpkDATE2.Text + "','YYYY/MM/DD') +1 ";
            if (!PubFunc.StrIsEmpty(ddlDEPTID.SelectedValue))
            {
                strWhere += " and DEPTID = '" + ddlDEPTID.SelectedValue + "'";
            }
            if (!PubFunc.StrIsEmpty(ddlSUPID.SelectedValue))
            {
                strWhere += " and SUPID = '" + ddlSUPID.SelectedValue + "'";
            }

            strWhere += " group by SUPID,KCADD,DEPTID ";
            strWhere += " ORDER BY DEPTID,SUPID,KCADD";
            if (strWhere.Trim().Length > 0)
            {
                strSql = strSql + strWhere;
            }
            DataTable dtData = PubFunc.DbGetPage(GridGoods.PageIndex, GridGoods.PageSize, strSql, ref total);

            GridGoods.RecordCount = total;
            GridGoods.DataSource  = dtData;
            GridGoods.DataBind();
            OutputSummaryData(strSql);
        }
Example #25
0
        private void DataSearch()
        {
            int    total  = 0;
            string strSql = @"SELECT A.SEQNO,A.BILLNO,B.NAME FLAG_CN,A.FLAG,A.XSRQ,F_GETDEPTNAME(A.DEPTOUT) DEPTOUT,A.SUBNUM,F_GETUSERNAME(A.SLR) SLR
                                FROM DAT_CK_DOC A, SYS_CODEVALUE B 
                               WHERE A.FLAG = B.CODE AND A.FLAG = 'Y' AND B.TYPE  ='DIC_BILLSTATUS' AND A.BILLTYPE='LCD' AND A.XSTYPE='1' AND A.DEPTID='{0}' 
                            ORDER BY A.XSRQ DESC";

            //获取显示名称标记
            DataTable dtData = PubFunc.DbGetPage(GridBill.PageIndex, GridBill.PageSize, string.Format(strSql, docDEPTID.SelectedValue), ref total);

            GridBill.RecordCount = total;
            GridBill.DataSource  = dtData;
            GridBill.DataBind();
        }
Example #26
0
        protected void winCATID_SelectedIndexChanged(object sender, EventArgs e)
        {
            string strCATID0, strCATID, strSQL;

            strCATID = ((FineUIPro.DropDownList)sender).SelectedValue;
            if (PubFunc.StrIsEmpty(strCATID))
            {
                return;
            }

            strSQL    = "select type from sys_category where code='" + strCATID + "'";
            strCATID0 = DbHelperOra.GetSingle(strSQL).ToString();

            winCATID0.SelectedValue = strCATID0;
        }
Example #27
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Micolor_CleanParameterControl"/> class.
        /// </summary>
        public Micolor_CleanParameterControl()
        {
            this.InitializeComponent();

            PubFunc.SetNumricMaxAndMin(this, true);


            this.comboBoxCleanMode.Items.Clear();
            foreach (EpsonAutoCleanWay value in Enum.GetValues(typeof(EpsonAutoCleanWay)))
            {
                string txt = ResString.GetEnumDisplayName(value.GetType(), value);
                this.comboBoxCleanMode.Items.Add(txt);
            }
            this.comboBoxCleanMode.SelectedIndex = 0;
        }
Example #28
0
 protected void btExport_Click(object sender, EventArgs e)
 {
     if (GridGoods == null)
     {
         Alert.Show("没有数据,无法导出!");
         return;
     }
     Response.ClearContent();
     Response.AddHeader("content-disposition", "attachment; filename=供应商进销存汇总报表.xls");
     Response.ContentType     = "application/excel";
     Response.ContentEncoding = System.Text.Encoding.UTF8;
     Response.Write(PubFunc.GridToHtml(GridGoods));
     Response.End();
     btnExp.Enabled = true;
 }
Example #29
0
        protected void GridCFGGoods_RowDoubleClick(object sender, FineUIPro.GridRowClickEventArgs e)
        {
            string    seq = GridCFGGoods.Rows[e.RowIndex].Values[0].ToString();
            DataTable dt  = DbHelperOra.Query(string.Format("select PZ.*,SP.GDNAME,decode(nvl(pz.iscfg,'Y'),'Y','Y','1','Y','N') ISCFGID from DOC_GOODSCFG PZ,DOC_GOODS SP where PZ.GDSEQ=SP.GDSEQ AND PZ.GDSEQ='{0}' AND PZ.DEPTID ='{1}'", seq, ddlDept.SelectedValue)).Tables[0];

            PubFunc.FormDataSet(FormConfig, dt.Rows[0]);
            if (DbHelperOra.Exists("SELECT 1 FROM SYS_DEPT WHERE CODE = '" + ddlDept.SelectedValue + "' AND TYPE IN('1','2')") && cbxTB.Checked)
            {
                trbHJCODE1.Enabled = true;
            }
            else
            {
                trbHJCODE1.Enabled = false;
            }
        }
Example #30
0
 protected void btnScan_Click(object sender, EventArgs e)
 {
     if (PubFunc.StrIsEmpty(docSEQNO.Text))
     {
         Alert.Show("请保存单据后进行扫描追溯码操作!", "消息提示", MessageBoxIcon.Warning);
         return;
     }
     if (!DbHelperOra.Exists(string.Format("SELECT 1 FROM DAT_CK_COM A,DOC_GOODS B WHERE A.GDSEQ = B.GDSEQ AND B.ISGZ = 'Y' AND SEQNO = '{0}'", docSEQNO.Text)))
     {
         Alert.Show("此单据中没有已经保存的高值商品,请检查!", "消息提示", MessageBoxIcon.Warning);
         return;
     }
     WindowScan.Hidden = false;
     ScanSearch("SHOW");
 }