private void DataInit()
        {
            //lstKSSJ.SelectedDate = DateTime.Now.AddDays(-30);
            //lstJSSJ.SelectedDate = DateTime.Now;
            //使用部门下拉表
            PubFunc.DdlDataGet("DDL_SYS_DEPT", lstDEPTID);
            PubFunc.DdlDataSql(lstDEPTID, @"select '' code, '--请选择--' name
  from dual
union all
select code, name
  from (select code, '[' || code || ']' || name name
          from sys_dept
         where type = '3'
           and flag = 'Y'
         order by code)
  ");
            try
            {
                hfdQCRQ.Text = DbHelperOra.GetSingle("select value from SYS_PARA where code = 'YH_DSHS'").ToString();
                QCQX.Text    = hfdQCRQ.Text;
            }
            catch
            {
                QCQX.Text = "14";
            }
        }
Example #2
0
 private void DataInit()
 {
     ButtonHidden(btnCopy);
     //PubFunc.DdlDataGet("DDL_SYS_DEPOT", lstDEPTOUT, docDEPTOUT);
     PubFunc.DdlDataGet("DDL_SYS_DEPTDEF", lstDEPTOUT, docDEPTOUT);
     DepartmentBind.BindDDL("DDL_SYS_DEPARTMENTRANGE", UserAction.UserID, lstDEPTID, docDEPTID);
     //DepartmentBind.BindDDL("DDL_SYS_DEPTRANGE", UserAction.UserID, lstDEPTID, docDEPTID);
     PubFunc.DdlDataGet("DDL_USER", lstSLR, docLRY, docSLR, docSHR);
     //PubFunc.DdlDataGet("DDL_SYS_DEPTNULL", lstDEPTID, docDEPTID);
     //PubFunc.DdlDataGet("DDL_BILL_STATUSDHD", docFLAG);
     PubFunc.DdlDataSql(lstFLAG, @"SELECT '' CODE ,'--请选择--' NAME  FROM dual
                                     union all
                                     SELECT 'N' CODE ,'新 单' NAME  FROM dual
                                     union all
                                     SELECT 'Y' CODE ,'已审核' NAME  FROM dual
                                     ");
     PubFunc.DdlDataSql(docFLAG, @"SELECT '' CODE ,'--请选择--' NAME  FROM dual
                                     union all
                                     SELECT 'N' CODE ,'新 单' NAME  FROM dual
                                     union all
                                     SELECT 'Y' CODE ,'已审核' NAME  FROM dual
                                     ");
     lstLRRQ1.SelectedDate = DateTime.Now.AddDays(-1);
     lstLRRQ2.SelectedDate = DateTime.Now;
 }
Example #3
0
        protected override void BindDDL()
        {
            string strpssid = @"SELECT CODE,NAME FROM(
                        SELECT '' CODE, '--请选择--' NAME
                          FROM DUAL
                        UNION
                        SELECT SUPID CODE, SUPNAME NAME
                          FROM DOC_SUPPLIER
                         WHERE ISPSS = 'Y'
                        UNION
                        SELECT DS.SUPID CODE, DS.SUPNAME NAME
                          FROM DOC_GOODSSUP DG, DOC_SUPPLIER DS
                         WHERE DG.SUPID = DS.SUPID(+)
                           AND DG.TYPE = 'Z'
                        ) ORDER BY CODE DESC";

            PubFunc.DdlDataGet("DDL_DOC_SUPPLIERALL", SUPNAME);
            PubFunc.DdlDataSql(lstPSSID, strpssid);
            PubFunc.DdlDataSql(docSUPID, strpssid);
            PubFunc.DdlDataGet("DDL_SYS_DEPTDEF", lstDEPTID, docDEPTID);
            PubFunc.DdlDataGet("DDL_SYS_DEPT", lstDEPTID);
            PubFunc.DdlDataGet("DDL_SYS_DEPOTRANGE", UserAction.UserID, ddlDEPTOUT);
            ddlDEPTOUT.SelectedIndex = 1;
            btnAudit.Enabled         = isOrder(ddlDEPTOUT.SelectedValue);
            btnDb.Enabled            = !btnAudit.Enabled;
            //PubFunc.DdlDataGet("DDL_STUTEQHM", lstFLAG);
            PubFunc.DdlDataGet("DDL_USER", lstLRY);
            PubFunc.DdlDataGet("DDL_GOODS_TYPE", docCatid);
            lstLRRQ1.SelectedDate    = DateTime.Now.AddDays(-7);
            lstLRRQ2.SelectedDate    = DateTime.Now;
            docDATE_SL1.SelectedDate = DateTime.Now.AddDays(-7);
            docDATE_SL2.SelectedDate = DateTime.Now;

            hfdDeptCode.Text = DbHelperOra.GetSingle("SELECT VALUE FROM SYS_PARA WHERE CODE='DEFDEPT'").ToString();
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string sqlSUPPLIER = @"SELECT '' CODE,'--请选择--' NAME  FROM dual
                                union all
                                SELECT SUPID CODE,SUPNAME NAME FROM DAT_DD_REMIND
                                GROUP BY SUPID,SUPNAME";
                PubFunc.DdlDataSql(lstSUPPLIER, sqlSUPPLIER);

                string sqlISGZ = @"SELECT '' CODE,'--请选择--' NAME  FROM dual
                                union all
                                SELECT 'Y' CODE,'高值' NAME  FROM dual
                                union all
                                SELECT 'N' CODE,'非高值' NAME  FROM dual";
                PubFunc.DdlDataSql(lstISGZ, sqlISGZ);

                string sqlBILLFLAG = @"SELECT '' CODE,'--请选择--' NAME  FROM dual
                                union all
                                SELECT 'S' CODE,'未受理' NAME  FROM dual
                                union all
                                SELECT '010' CODE,'已受理' NAME  FROM dual
                                union all
                                SELECT 'Y' CODE,'已出库' NAME  FROM dual";
                PubFunc.DdlDataSql(lstBILLFLAG, sqlBILLFLAG);
                DataSearch();
            }
        }
Example #5
0
        private void DataInit()
        {
            lstLRRQ1.SelectedDate = DateTime.Now.AddDays(-1);
            lstLRRQ2.SelectedDate = DateTime.Now;

            //当前用户是护士长,申领人下拉只显示当前科室下的用户
            if (UserAction.UserRole == "02")
            {
                string sqls = string.Format(@"select  CODE,NAME from (
                SELECT '--请选择--' NAME,'' CODE  FROM dual
                union all
                select username name, userid code
                       from sys_operuser 
                       where roleid = '{0}' and dept = '{1}' and islogin = '******')", UserAction.UserRole, UserAction.UserDept);
                PubFunc.DdlDataSql(docLRY, sqls);
                PubFunc.DdlDataSql(docSQR, sqls);
                PubFunc.DdlDataSql(docSHR, sqls);
                PubFunc.DdlDataSql(lstSQR, sqls);
            }
            else
            {
                PubFunc.DdlDataGet("DDL_USER", docLRY, docSQR, docSHR, lstSQR);
            }

            DepartmentBind.BindDDL("DDL_SYS_DEPTRANGE", UserAction.UserID, docDEPTID, lstDEPTID);

            if (docDEPTID.Items.Count > 0)
            {
                docDEPTID.SelectedIndex = 1;
            }
            if (lstDEPTID.Items.Count > 0)
            {
                lstDEPTID.SelectedIndex = 1;
            }

            string FlagSql = @"SELECT '' CODE ,'--请选择--' NAME  FROM dual";

            if (Request.QueryString["oper"] != null && Request.QueryString["oper"].ToString() != "audit")
            {
                FlagSql += @" union all
                                    SELECT 'M' CODE ,'新单' NAME FROM dual";
            }
            FlagSql += @" union all
                                    SELECT 'N' CODE ,'已提交' NAME  FROM dual
                                    union all
                                    SELECT 'Y' CODE ,'已审核' NAME  FROM dual
                                    union all
                                    SELECT 'R' CODE ,'已驳回' NAME  FROM dual";



            PubFunc.DdlDataSql(docFLAG, FlagSql);
            PubFunc.DdlDataSql(lstFLAG, FlagSql);

            PubFunc.DdlDataGet(ddlReject, "DDL_BILL_REASON");
        }
Example #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //PubFunc.DdlDataGet("DDL_SYS_DEPOT", docDEPTID);
         PubFunc.DdlDataSql(docDEPTID, "SELECT CODE, '[' || CODE || ']' || NAME NAME   FROM SYS_DEPT WHERE TYPE = 1 OR ISORDER='Y' ORDER BY CODE");
         lstLRRQ1.SelectedDate = DateTime.Now.AddDays(-1).AddMonths(-1);
         lstLRRQ2.SelectedDate = DateTime.Now.AddDays(-1);
     }
 }
Example #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataInit();
                billNew();

                //屏蔽不需要的操作按钮
                if (Request.QueryString["oper"] != null)
                {
                    string oper = Request.QueryString["oper"].ToString();
                    hfdOper.Text = oper;
                    if (oper == "sq")
                    {
                        ButtonHidden(btnAudit, btnCancel, btnExport);
                        TabStrip1.ActiveTabIndex = 1;
                        dpkLRRQ.SelectedDate     = DateTime.Now;
                        strFlagSql += @"SELECT 'M' CODE ,'新单' NAME  FROM dual
                                        union all 
                                        SELECT 'N' CODE ,'提交' NAME  FROM dual  
                                        union all
                                        SELECT 'Y' CODE ,'已审批' NAME  FROM dual
                                        union all
                                        SELECT 'R' CODE ,'已驳回' NAME  FROM DUAL ";

                        PubFunc.DdlDataSql(lstFLAG, strFlagSql);
                    }
                    else if (oper == "zj")
                    {
                        ButtonHidden(btnNew, btnDel, btnSave, btnTJ, btnAddRow, btnDelRow, btnUpdate, btnDelect);
                        TabStrip1.ActiveTabIndex = 0;
                        ddlSPR.SelectedValue     = UserAction.UserID;
                        dpkSPRQ.SelectedDate     = DateTime.Now;
                        billSearch();
                        strFlagSql += @"SELECT 'N' CODE ,'提交' NAME  FROM dual  
                                        union all
                                        SELECT 'S' CODE ,'已审核' NAME  FROM dual
                                        union all
                                        SELECT 'Y' CODE ,'已审批' NAME  FROM dual
                                        union all
                                        SELECT 'R' CODE ,'已驳回' NAME  FROM DUAL  ";

                        PubFunc.DdlDataSql(lstFLAG, strFlagSql);
                    }
                }
            }
        }
Example #8
0
        private void BindDDL()
        {
            DepartmentBind.BindDDL("DDL_SYS_DEPTHASATH", UserAction.UserID, ddlDEPTID);
            PubFunc.DdlDataSql(ddlFLag, @"SELECT '' FLAG ,'--请选择--' NAME  FROM dual
                                                union all
                                                SELECT 'N' FLAG ,'未使用' NAME  FROM dual
                                                union all
                                                SELECT 'Y' FLAG ,'已使用' NAME  FROM dual
                                                union all
                                                SELECT 'T' FLAG ,'已退货' NAME  FROM dual
                                                ");
            ddlFLag.SelectedValue   = "";
            ddlDEPTID.SelectedValue = DbHelperOra.GetSingle("SELECT CODE FROM SYS_DEPT WHERE  TYPE = 1 AND FLAG = 'Y' AND ROWNUM = 1").ToString();

            lstLRRQ1.SelectedDate = DateTime.Now;
            lstLRRQ2.SelectedDate = DateTime.Now;
        }
Example #9
0
 private void DataInit()
 {
     lstLRRQ1.SelectedDate = DateTime.Now.AddDays(-1);
     lstLRRQ2.SelectedDate = DateTime.Now;
     PubFunc.DdlDataGet("DDL_USER", docSHR, docLRY, docSLR);
     PubFunc.DdlDataGet("DDL_SYS_DEPTRANGE", UserAction.UserID, docDEPTID, lstDEPTID);
     //PubFunc.DdlDataGet("DDL_SYS_DEPOTRANGE", UserAction.UserID, docDEPTOUT);
     PubFunc.DdlDataGet("DDL_SYS_DEPOT", docDEPTOUT);
     //PubFunc.DdlDataGet("DDL_BILL_STATUS", docFLAG);
     PubFunc.DdlDataSql(docFLAG, @"SELECT '' CODE ,'--请选择--' NAME  FROM dual
                                     union all
                                     SELECT 'N' CODE ,'新单' NAME  FROM dual
                                     union all
                                     SELECT 'Y' CODE ,'已审核' NAME  FROM dual
                                     union all
                                     SELECT 'G' CODE ,'已完结' NAME  FROM dual");
     PubFunc.DdlDataGet(ddlReject, "DDL_BILL_REASON");
 }
Example #10
0
 private void DataInit()
 {
     PubFunc.DdlDataSql(ddlKFBH, "select code,'['||code||']'||name from sys_dept  where type in ('1','2')");
     PubFunc.DdlDataSql(ddllKFBH, "select code,'['||code||']'||name from sys_dept  where type in ('1','2')");
     PubFunc.DdlDataGet(ddlMANAGER, "DDL_USER");
     PubFunc.DdlDataGet(ddllMANAGER, "DDL_USER");
     PubFunc.DdlDataGet(ddlKB, "DDL_DEPOT_AREA");
     PubFunc.DdlDataGet(ddllKB, "DDL_DEPOT_AREA");
     //使用部门下拉表
     PubFunc.DdlDataGet("DDL_SYS_DEPT", lstDEPTID);
     ddlMANAGER.SelectedValue  = UserAction.UserID;
     ddllMANAGER.SelectedValue = UserAction.UserID;
     ddlABC.SelectedIndex      = 0;
     if (ViewTable != null)
     {
         ViewTable.Clear();
     }
 }
Example #11
0
        private void BindDDL()
        {
            PubFunc.DdlDataGet("DDL_SYS_DEPOT", ddlDEPTID);
            PubFunc.DdlDataGet("DDL_USER", lstLRY);
            string strSql1 = @"SELECT CODE,NAME FROM (SELECT '' CODE ,'--请选择--' NAME  FROM dual
                                            union all
                                            SELECT '0' CODE ,'正常' NAME  FROM dual
                                            union all
                                            SELECT '1' CODE ,'破损' NAME  FROM dual
                                            union all
                                            SELECT '2' CODE ,'失效' NAME  FROM dual
                                            union all
                                            SELECT '3' CODE ,'发霉' NAME  FROM dual)";

            PubFunc.DdlDataSql(ddlYHTYPE, strSql1);
            dpkDATE1.SelectedDate = DateTime.Now.AddDays(-1);
            dpkDATE2.SelectedDate = DateTime.Now;
        }
Example #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //PubFunc.DdlDataGet("DDL_DOC_FIRMNATURE",docCORPKID);
                PubFunc.DdlDataSql(docCORPKID, @"select  CODE,NAME from (
SELECT '0' CODE,'--请选择--' NAME  FROM dual
union all
SELECT code,NAME FROM SYS_CODEVALUE where type='DOC_FIRMNATURE'
)
ORDER BY NAME,code  ");
                PubFunc.DdlDataSql(lstFLAG, @"SELECT '' CODE ,'--请选择--' NAME  FROM dual
                                                union all
                                                SELECT 'N' CODE ,'未审核' NAME  FROM dual
                                                union all
                                                SELECT 'Y' CODE ,'审核通过' NAME  FROM dual
                                                ");
                dataSearch();
            }
        }
Example #13
0
        private void DataInit()
        {
            PubFunc.DdlDataGet("DDL_USER", lstLRY, docLRY, docSLR, docSHR);
            //PubFunc.DdlDataGet("DDL_BILL_STATUS", lstFLAG, docFLAG);
            string FlagSql = @"SELECT '' CODE ,'--请选择--' NAME  FROM dual
                                    union all
                                    SELECT 'M' CODE ,'新单' NAME  FROM dual
                                    union all
                                    SELECT 'N' CODE ,'已提交' NAME  FROM dual
                                    union all
                                    SELECT 'Y' CODE ,'已审核' NAME  FROM dual";

            PubFunc.DdlDataSql(docFLAG, FlagSql);
            PubFunc.DdlDataSql(lstFLAG, FlagSql);

            PubFunc.DdlDataGet("DDL_PRODUCER", ddlPRODUCER_OLD, ddlPRODUCER);
            PubFunc.DdlDataGet("DDL_UNIT", ddlUNIT, ddlUNIT_OLD);
            lstLRRQ1.SelectedDate = DateTime.Now.AddDays(-1);
            lstLRRQ2.SelectedDate = DateTime.Now;
        }
Example #14
0
        private void InitDdl()
        {
            PubFunc.DdlDataGet(ddlManager, "DDL_USER");
            PubFunc.DdlDataGet(ddlType, "DDL_" + strTable + "_TYPE");
            PubFunc.DdlDataGet("DDL_USER", ddlSTR4);
            PubFunc.DdlDataGet(ddlSTR3, "DAT_LX");
            PubFunc.DdlDataGet(ddlHOUSE, "DAT_LOUDONG");
            PubFunc.DdlDataGet(ddlFLOOR, "DDL_LOUCENG");
            //PubFunc.DdlDataGet("DDL_SYS_DEPOTRANGE_ORDER", UserAction.UserID, ddlSTOCK);
            string sqlDepotrange = @"
select '0' code,'无' name from dual
union all
SELECT CODE, NAME
  FROM(SELECT '' CODE, '--请选择--' NAME
          FROM DUAL
        UNION ALL
        SELECT CODE, '[' || CODE || ']' || NAME NAME
          FROM SYS_DEPT
         WHERE  TYPE IN('1', '2') AND ISORDER = 'Y' AND F_CHK_DATARANGE(CODE, '{0}') = 'Y')
 ORDER BY CODE DESC       ";

            PubFunc.DdlDataSql(ddlSTOCK, string.Format(sqlDepotrange, UserAction.UserID));

            string strsql = @"select  CODE,NAME from (
                                    SELECT '0' CODE ,'无' NAME  FROM dual
                                    union all
                                    select code,name from @TABLE where islast='N'
                                    )
                                    ORDER BY DECODE(CODE,'',99,0) DESC ,CODE ASC";

            strsql = strsql.Replace("@TABLE", strTable);

            PubFunc.DdlDataSql(ddlSJCODE, strsql);
            DataTable dtDDLdata = (DataTable)ddlSJCODE.DataSource;

            ddlSearch.DataTextField  = dtDDLdata.Columns[1].ToString();
            ddlSearch.DataValueField = dtDDLdata.Columns[0].ToString();
            ddlSearch.DataSource     = dtDDLdata;
            ddlSearch.DataBind();
        }
Example #15
0
        private void DataInit()
        {
            PubFunc.DdlDataGet("DDL_SYS_DEPOT", docDEPTOUT);

            //当前用户是护士长,申领人下拉只显示当前科室下的用户
            if (UserAction.UserRole == "02" || UserAction.UserRole == "10")
            {
                string sqls = string.Format(@"select  CODE,NAME from (
                                                                    SELECT '--请选择--' NAME,'' CODE  FROM dual
                                                                    union all
                                                                    select username name, userid code
                                                                           from sys_operuser 
                                                                           where roleid = '{0}' and dept = '{1}' and islogin = '******')",
                                            UserAction.UserRole, UserAction.UserDept);
                PubFunc.DdlDataSql(lstSLR, sqls);
                PubFunc.DdlDataSql(docLRY, sqls);
                PubFunc.DdlDataSql(docSLR, sqls);
                PubFunc.DdlDataSql(docSHR, sqls);
            }
            else
            {
                PubFunc.DdlDataGet("DDL_USER", lstSLR, docLRY, docSLR, docSHR);
                ButtonHidden(btnAuditBatch, btnAudit);
            }

            DepartmentBind.BindDDL("DDL_SYS_DEPTRANGE", UserAction.UserID, docDEPTID, lstDEPTID);
            PubFunc.DdlDataGet(ddlReject, "DDL_BILL_REASON");

            if (docDEPTOUT.Items.Count > 0)
            {
                docDEPTOUT.SelectedIndex = 1;
            }
            if (docDEPTID.Items.Count > 0)
            {
                docDEPTID.SelectedIndex = 1;
            }

            lstLRRQ1.SelectedDate = DateTime.Now.AddDays(-7);
            lstLRRQ2.SelectedDate = DateTime.Now;
        }
Example #16
0
        private void DataInit()
        {
            lstLRRQ1.SelectedDate = DateTime.Now;
            lstLRRQ2.SelectedDate = DateTime.Now;


            //当前用户是护士长,申领人下拉只显示当前科室下的用户
            if (UserAction.UserRole == "02")
            {
                string sqls = string.Format(@"select  CODE,NAME from (
SELECT '--请选择--' NAME,'' CODE  FROM dual
union all
select username name, userid code
       from sys_operuser 
       where roleid = '{0}' and dept = '{1}' and islogin = '******')", UserAction.UserRole, UserAction.UserDept);
                PubFunc.DdlDataSql(ddlUser, sqls);
                PubFunc.DdlDataSql(docLRY, sqls);
            }
            else
            {
                PubFunc.DdlDataGet("DDL_USER", ddlUser, docLRY);
            }

            DepartmentBind.BindDDL("DDL_SYS_DEPTRANGE", UserAction.UserID, docDEPTID, lstDEPTID);
            //获取客户化GRF文件地址  By c 2016年1月21日12:18:29 At 威海509
            string grf = Doc.DbGetGrf("SPXSD");

            if (!string.IsNullOrWhiteSpace(grf))
            {
                SPXSD = grf;
            }

            string report = ConfigurationManager.AppSettings["REPORT"];

            if (!string.IsNullOrWhiteSpace(report))
            {
                REPORT = report;
            }
        }
Example #17
0
        private void DataInit()
        {
            PubFunc.DdlDataGet("DDL_SYS_DEPOT", lstDEPTOUT, docDEPTOUT);
            //PubFunc.DdlDataGet("DDL_SYS_DEPOTRANGE", UserAction.UserID, lstDEPTOUT, docDEPTOUT);
            DepartmentBind.BindDDL("DDL_SYS_DEPTRANGE", UserAction.UserID, lstDEPTID, docDEPTID);
            PubFunc.DdlDataGet("DDL_USER", lstSLR, docLRY, docSLR);
            //PubFunc.DdlDataGet("DDL_SYS_DEPTNULL", lstDEPTID, docDEPTID);
            //PubFunc.DdlDataGet("DDL_BILL_STATUSDHD", lstFLAG, docFLAG);
            string FlagSql = @"SELECT '' CODE ,'--请选择--' NAME  FROM dual
                                    union all
                                    SELECT 'N' CODE ,'新单' NAME  FROM dual
                                    union all
                                    SELECT 'Y' CODE ,'已审核' NAME  FROM dual
                                    union all
                                    SELECT 'R' CODE ,'已驳回' NAME  FROM dual";

            PubFunc.DdlDataSql(docFLAG, FlagSql);
            PubFunc.DdlDataSql(lstFLAG, FlagSql);

            lstLRRQ1.SelectedDate = DateTime.Now;
            lstLRRQ2.SelectedDate = DateTime.Now;
        }
Example #18
0
        private void DataInit()
        {
            lstLRRQ1.SelectedDate = DateTime.Now.AddDays(-1);
            lstLRRQ2.SelectedDate = DateTime.Now;

            PubFunc.DdlDataGet("DDL_USER", docLRY, docSQR, docSHR, lstSQR);
            DepartmentBind.BindDDL("DDL_SYS_DEPTRANGE", UserAction.UserID, docDEPTID, lstDEPTID);
            string FlagSql = @"SELECT '' CODE ,'--请选择--' NAME  FROM dual
                                    union all
                                    SELECT 'M' CODE ,'新单' NAME  FROM dual
                                    union all
                                    SELECT 'N' CODE ,'已提交' NAME  FROM dual
                                    union all
                                    SELECT 'Y' CODE ,'已审核' NAME  FROM dual
                                    union all
                                    SELECT 'R' CODE ,'已驳回' NAME  FROM dual";

            PubFunc.DdlDataSql(docFLAG, FlagSql);
            PubFunc.DdlDataSql(lstFLAG, FlagSql);

            PubFunc.DdlDataGet(ddlReject, "DDL_BILL_REASON");
        }
Example #19
0
        private void InitDdl()
        {
            PubFunc.DdlDataGet(ddlManager, "DDL_USER");
            PubFunc.DdlDataGet(ddlType, "DDL_" + strTable + "_TYPE");

            string strsql = @"select  CODE,NAME from (
                                    SELECT '0' CODE ,'无' NAME  FROM dual
                                    union all
                                    select code,name from @TABLE where islast='N'
                                    )
                                    ORDER BY DECODE(CODE,'',99,0) DESC ,CODE ASC";

            strsql = strsql.Replace("@TABLE", strTable);

            PubFunc.DdlDataSql(ddlSJCODE, strsql);

            DataTable dtDDLdata = (DataTable)ddlSJCODE.DataSource;

            ddlSearch.DataTextField  = dtDDLdata.Columns[1].ToString();
            ddlSearch.DataValueField = dtDDLdata.Columns[0].ToString();
            ddlSearch.DataSource     = dtDDLdata;
            ddlSearch.DataBind();
        }
Example #20
0
 private void DataInit()
 {
     lstLRRQ1.SelectedDate = DateTime.Now.AddDays(-1);
     lstLRRQ2.SelectedDate = DateTime.Now;
     PubFunc.DdlDataGet(docLRY, "DDL_USER");
     PubFunc.DdlDataGet(ddlSPR, "DDL_USER");
     PubFunc.DdlDataGet(lstFLAG, "DDL_ADDGOODSNEWCJ");
     PubFunc.DdlDataGet("DDL_TZGOODS_STATUS", ddlFLAG);
     PubFunc.DdlDataSql(ddlCORPKID, @"select  CODE,NAME from (
                                                 SELECT '0' CODE,'--请选择--' NAME  FROM dual
                                                 union all
                                                 SELECT code,NAME FROM SYS_CODEVALUE where type='DOC_FIRMNATURE'
                                                 )
                                                 ORDER BY NAME,code  ");
     PubFunc.DdlDataSql(docCORPKID, @"select  CODE,NAME from (
                                                 SELECT '0' CODE,'--请选择--' NAME  FROM dual
                                                 union all
                                                 SELECT code,NAME FROM SYS_CODEVALUE where type='DOC_FIRMNATURE'
                                                 )
                                                 ORDER BY NAME,code  ");
     // 绑定到下拉列表(启用模拟树功能)
     ddlFLAG.SelectedValue = "M";
 }
Example #21
0
        private void DataInit()
        {
            PubFunc.DdlDataGet("DDL_SYS_DEPOT", lstDEPTID, docDEPTID, ddlDEPTID);
            string    strSql = @"SELECT CODE,NAME FROM (SELECT '' CODE ,'--请选择--' NAME  FROM dual
                                            union all
                                            SELECT 'M' CODE ,'新单' NAME  FROM dual
                                            union all
                                            SELECT 'N' CODE ,'已提交' NAME  FROM dual
                                            union all
                                            SELECT 'Y' CODE ,'已审核' NAME  FROM dual)";
            DataTable dt     = DbHelperOra.Query(strSql).Tables[0];

            docFLAG.DataTextField  = "NAME";
            docFLAG.DataValueField = "CODE";
            docFLAG.DataSource     = dt;
            docFLAG.DataBind();
            lstFLAG.DataTextField  = "NAME";
            lstFLAG.DataValueField = "CODE";
            lstFLAG.DataSource     = dt;
            lstFLAG.DataBind();

            string strSql1 = @"SELECT CODE,NAME FROM (
                                            SELECT '0' CODE ,'正常' NAME  FROM dual
                                            union all
                                            SELECT '1' CODE ,'破损' NAME  FROM dual
                                            union all
                                            SELECT '2' CODE ,'失效' NAME  FROM dual
                                            union all
                                            SELECT '3' CODE ,'发霉' NAME  FROM dual)";

            PubFunc.DdlDataSql(comYHTYPE, strSql1);
            docDEPTID.SelectedValue = "01";
            PubFunc.DdlDataGet("DDL_USER", ddlLRY, ddlSHR, ddlYHY, lstYHY);
            dpkDATE1.SelectedDate = DateTime.Now.AddDays(-1);
            dpkDATE2.SelectedDate = DateTime.Now;
            billNew();
        }
Example #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataInit();
                billNew();

                //屏蔽不需要的操作按钮
                if (Request.QueryString["oper"] != null)
                {
                    string oper = Request.QueryString["oper"].ToString();
                    hfdOper.Text = oper;
                    if (oper == "sq")
                    {
                        ButtonHidden(btnSaveFa, btnAudit, btnTJFA, btnCancel, btnDelete, btnPrint, btnExport, btnCopy);
                        TabStrip1.ActiveTabIndex = 1;
                        strFlagSql += @"SELECT 'M' CODE ,'新单' NAME  FROM dual
                                        union all 
                                        SELECT 'N' CODE ,'需求提交' NAME  FROM dual  
                                        union all
                                        SELECT 'Y' CODE ,'已审批' NAME  FROM dual
                                        union all
                                        SELECT 'F' CODE ,'已废弃' NAME  FROM DUAL ";

                        PubFunc.DdlDataSql(lstFLAG, strFlagSql);
                    }
                    else if (oper == "fa")
                    {
                        ButtonHidden(btnNew, btnDel, btnSave, btnTJ, btnAudit, btnAddRow, btnCancel, btnDelRow, btnExport, btnCopy);
                        btnPrint.Hidden          = false;
                        TabStrip1.ActiveTabIndex = 0;
                        ddlSPR.SelectedValue     = UserAction.UserID;
                        dpkSPRQ.SelectedDate     = DateTime.Now;
                        billSearch();

                        strFlagSql += @"SELECT 'N' CODE ,'需求提交' NAME  FROM dual
                                        union all 
                                        SELECT 'S' CODE ,'方案提交' NAME  FROM dual
                                        union all
                                        SELECT 'Y' CODE ,'已审批' NAME  FROM dual
                                        union all
                                        SELECT 'R' CODE ,'已驳回' NAME  FROM DUAL
                                        union all
                                        SELECT 'F' CODE ,'已废弃' NAME  FROM DUAL  ";

                        PubFunc.DdlDataSql(lstFLAG, strFlagSql);
                    }
                    else if (oper == "sp")
                    {
                        ButtonHidden(btnCancel, btnNew, btnDel, btnSave, btnSaveFa, btnTJ, btnTJFA, btnAddRow, btnDelRow, btnDelete, btnPrint, btnExport, btnCopy);
                        TabStrip1.ActiveTabIndex = 0;
                        ddlSHR.SelectedValue     = UserAction.UserID;
                        dpkSHRQ.SelectedDate     = DateTime.Now;
                        billSearch();

                        strFlagSql += @"SELECT 'S' CODE ,'方案提交' NAME  FROM dual
                                        union all
                                        SELECT 'Y' CODE ,'已审批' NAME  FROM dual
                                        union all
                                        SELECT 'R' CODE ,'已驳回' NAME  FROM DUAL  ";

                        PubFunc.DdlDataSql(lstFLAG, strFlagSql);
                    }
                }
                JObject defaultObj = new JObject();
                defaultObj.Add("GDNAME", "");
                defaultObj.Add("GDSPEC", "");
                defaultObj.Add("UNIT", "");
                defaultObj.Add("SL", "0");
                defaultObj.Add("HSJJ", "");
                defaultObj.Add("HSJE", "");
                defaultObj.Add("PRODUCER", "");
                defaultObj.Add("MEMOGOODS", "");
                defaultObj.Add("ISNEW", "");
                defaultObj.Add("MEMOBUY", "");
                defaultObj.Add("ISPASS", "");
                defaultObj.Add("MEMOPASS", "");

                // 第一行新增一条数据
                btnAddRow.OnClientClick = GridGoods.GetAddNewRecordReference(defaultObj);
            }
        }