Exemple #1
0
 protected override void billAudit()
 {
     if (docSEQNO.Text.Length < 1)
     {
         Alert.Show("请选择需要付款的结算单!");; return;
     }
     if (docFLAG.SelectedValue != "Y")
     {
         Alert.Show("未审核单据或已付款单据,不能付款!");
         return;
     }
     //付款金额不增加控制
     if (PubFunc.StrIsEmpty(tgbFPHM.Text))
     {
         docFPJE.Text = "0";
     }
     if (Convert.ToDecimal(docFPJE.Text) < Convert.ToDecimal(nbxJSJE.Text) && !PubFunc.StrIsEmpty(tgbFPHM.Text))
     {
         Alert.Show("发票金额不能小于实结金额!");
         return;
     }
     nbxWJJE.Text = (Convert.ToDecimal(nbbYJJJ.Text) - Convert.ToDecimal(nbxJSJE.Text)).ToString();
     DbHelperOra.ExecuteSql("update dat_jsd_doc set flag='G',JSJE=" + nbxJSJE.Text + ",WJJE=" + nbxWJJE.Text + ",FPJE=" + docFPJE.Text + ",UPTTIME =sysdate,FKY='" + ddlFKY.SelectedValue + "',FKRQ=to_date('" + dpkFKRQ.Text + "','YYYY-MM-DD'),memo='" + tbxMEMO.Text + "',FPHM ='" + tgbFPHM.Text + "' where seqno ='" + docSEQNO.Text + "'");
     //将出库单标志改为'G'
     OracleParameter[] parameters = new OracleParameter[]
     {
         new OracleParameter("BILLNO", OracleDbType.Varchar2),
         new OracleParameter("FPHM", OracleDbType.Varchar2)
     };
     parameters[0].Value = docSEQNO.Text;
     parameters[1].Value = tgbFPHM.Text;
     DbHelperOra.RunProcedure("P_JSD_FP", parameters);
     Alert.Show("单据【" + docSEQNO.Text + "】付款成功!");
     billOpen(docSEQNO.Text);
 }
Exemple #2
0
        /// <summary>
        /// 卷宗数量统计
        /// </summary>
        /// <param name="strWhere">查询条件</param>
        /// <param name="dwbm">单位编码</param>
        /// <param name="gh">工号</param>
        /// <param name="systemmark">系统编号</param>
        /// <param name="configid">配置类型编号</param>
        /// <param name="orderby">排序</param>
        /// <param name="count">返回总数</param>
        /// <param name="objValues">参数值</param>
        /// <returns></returns>
        public DataSet GetJZNumberByReport(string strWhere, string dwbm, string gh, string systemmark, int configid, out Decimal count, params object[] objValues)
        {
            OracleParameter[] parameters =
            {
                new OracleParameter("p_dwbm",       OracleType.VarChar,   50),
                new OracleParameter("p_gh",         OracleType.Char,       4),
                new OracleParameter("p_systemmark", OracleType.VarChar,   50),
                new OracleParameter("p_configid",   OracleType.Number),
                new OracleParameter("p_where",      OracleType.VarChar, 4000),
                new OracleParameter("p_count",      OracleType.Number,     8),
                new OracleParameter("p_cursor",     OracleType.Cursor),
                new OracleParameter("p_errmsg",     OracleType.VarChar, 500)
            };
            parameters[0].Value     = dwbm;
            parameters[1].Value     = gh;
            parameters[2].Value     = systemmark;
            parameters[3].Value     = configid;
            parameters[4].Value     = strWhere;
            parameters[5].Direction = ParameterDirection.Output;
            parameters[6].Direction = ParameterDirection.Output;
            parameters[7].Direction = ParameterDirection.Output;

            try
            {
                DataSet ds = DbHelperOra.RunProcedure("pkg_dzjz_report.proc_report_jznumber", parameters, "proc_report_jznumber");
                count = Convert.ToDecimal(parameters[5].Value);
                return(ds);
            }
            catch (Exception ex)
            {
                EDRS.Common.LogHelper.LogError(this.context, "Exception", ex.Message, "public DataSet GetJZNumberStatistics(string strWhere, string orderby, int startIndex, int endIndex, params object[] objValues)", "EDRS.OracleDAL.DataStatistics", "pkg_dzjz_report.proc_report_jznumber", parameters);
            }
            count = 0;
            return(null);
        }
Exemple #3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            //校验
            if (!DbHelperOra.Exists("SELECT 1 FROM dat_sl_imp WHERE LRY = '" + UserAction.UserID + "' AND FLAG = 'N'"))
            {
                Alert.Show("不存在可生成单据的数据,请检查!", "提示信息", MessageBoxIcon.Warning);
                return;
            }

            OracleParameter[] parameters = new OracleParameter[]
            {
                new OracleParameter("V_USER", OracleDbType.Varchar2),
                new OracleParameter("V_OPER", OracleDbType.Varchar2),
                new OracleParameter("V_SEQNO", OracleDbType.Varchar2),
            };

            parameters[0].Value = UserAction.UserID;
            parameters[1].Value = @"SL_SUMBIT";
            parameters[2].Value = hfdseqno.Text;
            try
            {
                DbHelperOra.RunProcedure("P_SL_IMPORT", parameters);
                Alert.Show("提交成功,已生成对应单据信息!", "提示信息", MessageBoxIcon.Information);
                GridStock.DataSource = null;
                GridStock.DataBind();
                btnSave.Enabled = false;
            }
            catch (Exception ex)
            {
                Alert.Show(ex.Message, "错误", MessageBoxIcon.Error);
            }
        }
Exemple #4
0
        /// <summary>
        /// 单位卷宗制作情况案件类别统计
        /// </summary>
        /// <param name="strWhere">查询条件</param>
        /// <param name="dwbm">单位编码</param>
        /// <param name="gh">工号</param>
        /// <param name="objValues">参数值</param>
        /// <returns></returns>
        public DataSet GetDwJzZzStatisticsByLb(string strWhere, string strWhereDw, string dwbm, string gh, string jsbm, string bmbm, string orderby, params object[] objValues)
        {
            OracleParameter[] parameters =
            {
                new OracleParameter("p_dwbm",     OracleType.VarChar,   50),
                new OracleParameter("p_gh",       OracleType.Char,       4),
                new OracleParameter("p_jsbm",     OracleType.VarChar,   50),
                new OracleParameter("p_bmbm",     OracleType.VarChar,   50),
                new OracleParameter("p_where",    OracleType.VarChar, 4000),
                new OracleParameter("p_where_dw", OracleType.VarChar, 4000),
                new OracleParameter("p_order",    OracleType.VarChar,  100),
                new OracleParameter("p_cursor",   OracleType.Cursor),
                new OracleParameter("p_errmsg",   OracleType.VarChar, 500)
            };
            parameters[0].Value     = dwbm;
            parameters[1].Value     = gh;
            parameters[2].Value     = jsbm;
            parameters[3].Value     = bmbm;
            parameters[4].Value     = strWhere;
            parameters[5].Value     = strWhereDw;
            parameters[6].Value     = orderby;
            parameters[7].Direction = ParameterDirection.Output;
            parameters[8].Direction = ParameterDirection.Output;

            try
            {
                DataSet ds = DbHelperOra.RunProcedure("pkg_dzjz_report.proc_report_dwjzzzlb", parameters, "proc_report_dwjzzzlb");
                return(ds);
            }
            catch (Exception ex)
            {
                EDRS.Common.LogHelper.LogError(this.context, "Exception", ex.Message, "public DataSet GetDwJzZzStatisticsByLb(string strWhere, string dwbm, string gh, params object[] objValues)", "EDRS.OracleDAL.DataStatistics", "pkg_dzjz_report.proc_report_dwjzzzlb", parameters);
            }
            return(null);
        }
Exemple #5
0
        protected void btnMH_Click(object sender, EventArgs e)
        {
            if (PubFunc.StrIsEmpty(tgbExlBill.Text))
            {
                Alert.Show("请首先输入完整导入单号!", "消息提示", MessageBoxIcon.Warning);
                return;
            }
            if (!DbHelperOra.Exists("SELECT 1 FROM DAT_UPLOAD_GOODS WHERE SEQNO = '" + tgbExlBill.Text + "' AND FLAG = 'N'"))
            {
                Alert.Show("不存在需匹配信息!", "消息提示", MessageBoxIcon.Warning);
                return;
            }
            OracleParameter[] parameters = new OracleParameter[]
            {
                new OracleParameter("V_BILL", OracleDbType.Varchar2),
                new OracleParameter("V_TYPE", OracleDbType.Varchar2),
            };
            parameters[0].Value = tgbExlBill.Text;
            parameters[1].Value = '3';
            DbHelperOra.RunProcedure("P_ExlGOODS", parameters);
            string allnum = DbHelperOra.GetSingle("SELECT COUNT(1) FROM DAT_UPLOAD_GOODS WHERE SEQNO = '" + tgbExlBill.Text + "' AND FLAG ='Y' AND PPMODE = '2'").ToString();

            Alert.Show("糊匹配成功!\r\n共匹配[" + allnum + "]条数据!", "消息提示", MessageBoxIcon.Information);
            SearchOne();
            //TgbBill.Text = tgbExlBill.Text;
            btnGridOut_Click(null, null);
        }
Exemple #6
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     //校验
     if (!DbHelperOra.Exists("SELECT 1 FROM IMP_DOC_GOODS WHERE IMPOPER = '" + UserAction.UserID + "' AND STR3 = 'Y'"))
     {
         Alert.Show("不存在可导入的数据,请检查!", "提示信息", MessageBoxIcon.Warning);
         return;
     }
     if (!DbHelperOra.Exists("SELECT 1 FROM DOC_SUPPLIER WHERE SUPID = '00001'"))
     {
         Alert.Show("未定义医院供应商【00001】,请检查!", "提示信息", MessageBoxIcon.Warning);
         return;
     }
     OracleParameter[] param = { new OracleParameter("V_USER",   OracleDbType.Varchar2, 20),
                                 new OracleParameter("V_TYPE",   OracleDbType.Varchar2, 20),
                                 new OracleParameter("V_CATID0", OracleDbType.Varchar2, 1) };
     param[0].Value = UserAction.UserID;
     param[1].Value = "INS";
     param[2].Value = string.IsNullOrWhiteSpace(ddlCATID0.SelectedValue) ? "2" : ddlCATID0.SelectedValue;
     try
     {
         DbHelperOra.RunProcedure("P_GOODS_IMP", param);
         Alert.Show("提交成功,商品资料信息已导入!", "提示信息", MessageBoxIcon.Information);
         GridStock.DataSource = null;
         GridStock.DataBind();
         btnSave.Enabled = false;
     }
     catch (Exception ex)
     {
         Alert.Show(ex.Message, "错误", MessageBoxIcon.Error);
     }
 }
Exemple #7
0
        /// <summary>
        /// 清理日志记录表
        /// </summary>
        private void LogClearTable()
        {
            int time = ConfigHelper.GetConfigInt("LogClearTime");

            if (time <= 0)
            {
                return;
            }
            DateTime date = DateTime.Now.AddMonths(-time);

            OracleParameter[] parameters =
            {
                new OracleParameter("p_time",   OracleType.DateTime),
                new OracleParameter("p_errmsg", OracleType.VarChar, 512)
            };
            parameters[0].Value     = date;
            parameters[1].Direction = ParameterDirection.Output;
            try
            {
                OracleDataReader dr = DbHelperOra.RunProcedure("pkg_zzjg_manage.proc_delete_jzrzjl", parameters);
                dr.Close();
                if (parameters[1].Value != null && !string.IsNullOrEmpty(parameters[1].Value.ToString()))
                {
                    EDRS.Common.LogHelper.LogError(this.context, "Exception", parameters[1].Value.ToString(), "private void LogClearTable()", "EDRS.OracleDAL.YX_DZJZ_JZRZJL", "PKG_ZZJG_MANAGE.proc_delete_jzrzjl", parameters);
                }
            }
            catch (Exception ex)
            {
                EDRS.Common.LogHelper.LogError(this.context, "Exception", ex.Message, "private void LogClearTable()", "EDRS.OracleDAL.YX_DZJZ_JZRZJL", "PKG_ZZJG_MANAGE.proc_delete_jzrzjl", parameters);
            }
        }
Exemple #8
0
        public DataSet GetCaseGroupMouth(string where, string roleDwbmWhere, string orderby, params object[] objValues)
        {
            OracleParameter[] parameters =
            {
                new OracleParameter("p_where",  OracleType.VarChar, int.MaxValue),
                new OracleParameter("p_rwhere", OracleType.VarChar, int.MaxValue),
                new OracleParameter("p_order",  OracleType.VarChar,         1000),
                new OracleParameter("p_cursor", OracleType.Cursor),
                new OracleParameter("p_errmsg", OracleType.VarChar, 100)
            };

            parameters[0].Value     = where;
            parameters[1].Value     = roleDwbmWhere;
            parameters[2].Value     = orderby;
            parameters[3].Direction = ParameterDirection.Output;
            parameters[4].Direction = ParameterDirection.Output;

            try
            {
                DataSet ds = DbHelperOra.RunProcedure("pkg_dzjz_report.proc_report_CaseGroupMouth", parameters, "proc_report_CaseGroupMouth");
                return(ds);
            }
            catch (Exception ex)
            {
                EDRS.Common.LogHelper.LogError(this.context, "Exception", ex.Message, "public DataSet GetCaseGroupMouth(string where, string roleDwbmWhere, params object[] objValues)", "EDRS.OracleDAL.DataStatistics", "pkg_dzjz_report.proc_report_jznumber", parameters);
            }
            return(null);
        }
Exemple #9
0
 private void FP_Action()
 {
     //进行库存分配
     try{
         if (docFLAG.SelectedValue == "A")
         {
             OracleParameter[] parameters = new OracleParameter[]
             {
                 new OracleParameter("BILLNO", OracleDbType.Varchar2),
                 new OracleParameter("USERID", OracleDbType.Varchar2),
             };
             parameters[0].Value = docSEQNO.Text;
             parameters[1].Value = UserAction.UserID;
             DbHelperOra.RunProcedure("STOREDS.P_FP_DBD", parameters);
             billOpen(docSEQNO.Text);
             Alert.Show("库存分配成功,可继续审核出库!");
         }
         else
         {
             Alert.Show("单据状态不正确,不能进行库存分配!");
             return;
         }
     }
     catch (Exception ex)
     {
         Alert.Show(ERPUtility.errorParse(ex.Message), "消息提示", MessageBoxIcon.Warning);
     }
 }
Exemple #10
0
        //卷宗业务情况汇总
        public DataSet GetCaseBusinessReport(string where, string havingWhere, string roleDwbmWhere, int pageSize, int pageIndex, string orderby, out int count, params object[] objValues)
        {
            count = 0;
            OracleParameter[] parameters =
            {
                new OracleParameter("p_where",  OracleType.VarChar, 1000),
                new OracleParameter("p_hwhere", OracleType.VarChar, 1000),
                new OracleParameter("p_rwhere", OracleType.VarChar, 1000),
                new OracleParameter("p_cursor", OracleType.Cursor),
                new OracleParameter("p_errmsg", OracleType.VarChar, 100)
            };

            parameters[0].Value     = where;
            parameters[1].Value     = havingWhere;
            parameters[2].Value     = roleDwbmWhere;
            parameters[3].Direction = ParameterDirection.Output;
            parameters[4].Direction = ParameterDirection.Output;

            try
            {
                DataSet ds = DbHelperOra.RunProcedure("pkg_dzjz_report.proc_report_casebusinessreport", parameters, "proc_report_casebusinessreport");
                return(ds);
            }
            catch (Exception ex)
            {
                EDRS.Common.LogHelper.LogError(this.context, "Exception", ex.Message, "public DataSet GetCaseGroupByUnit(string where, string roleDwbmWhere, int pageSize, int pageIndex, string orderby, out int count, params object[] objValues)", "EDRS.OracleDAL.DataStatistics", "pkg_dzjz_report.proc_report_jznumber", parameters);
            }
            count = 0;
            return(null);
        }
Exemple #11
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     //校验
     if (!DbHelperOra.Exists("SELECT 1 FROM DAT_STOCK_IMP WHERE LRY = '" + UserAction.UserID + "' AND FLAG = 'Y'"))
     {
         Alert.Show("不存在可生成单据的数据,请检查!", "提示信息", MessageBoxIcon.Warning);
         return;
     }
     if (!DbHelperOra.Exists("SELECT 1 FROM DOC_SUPPLIER WHERE SUPID = '00001'"))
     {
         Alert.Show("未定义医院供应商【00001】,请检查!", "提示信息", MessageBoxIcon.Warning);
         return;
     }
     OracleParameter[] param =
     {
         new OracleParameter("V_USER", OracleDbType.Varchar2, 20),
         new OracleParameter("V_TYPE", OracleDbType.Varchar2, 20),
     };
     param[0].Value = UserAction.UserID;
     param[1].Value = ddlTYPE.SelectedValue;
     try
     {
         DbHelperOra.RunProcedure("P_STOCK_IMP", param);
         Alert.Show("提交成功,已生成对应单据信息!", "提示信息", MessageBoxIcon.Information);
         GridStock.DataSource = null;
         GridStock.DataBind();
         btnSave.Enabled = false;
     }
     catch (Exception ex)
     {
         Alert.Show(ex.Message, "错误", MessageBoxIcon.Error);
     }
 }
Exemple #12
0
        protected void btnAutoOrder_Click(object sender, EventArgs e)
        {
            string   lsRET;
            DateTime dtrq1 = Convert.ToDateTime(lstLRRQ1.Text);
            DateTime dtrq2 = Convert.ToDateTime(lstLRRQ2.Text);
            string   dept  = docDEPTID.SelectedValue;

            if (PubFunc.StrIsEmpty(dept))
            {
                Alert.Show("请选择[" + docDEPTID.Label + "]!");
                return;
            }

            if (rblTYPE.SelectedValue == "XS" || rblTYPE.SelectedValue == "DS")
            {
                lsRET = PubFunc.isDateTwoValid(dtrq1, dtrq2);
                if (lsRET.Length > 1)
                {
                    Alert.Show(lsRET);
                    return;
                }
            }

            OracleParameter[] parameters =
            {
                new OracleParameter("VI_DEPT",    OracleDbType.Varchar2, 20),
                new OracleParameter("VI_TYPE",    OracleDbType.Varchar2, 20),
                new OracleParameter("VI_BEG",     OracleDbType.Varchar2, 10),
                new OracleParameter("VI_END",     OracleDbType.Varchar2, 10),
                new OracleParameter("VI_USER",    OracleDbType.Varchar2, 20),
                new OracleParameter("VO_BILLNUM", OracleDbType.Double)
            };
            parameters[0].Value = dept;
            parameters[1].Value = rblTYPE.SelectedValue;
            parameters[2].Value = lstLRRQ1.Text;
            parameters[3].Value = lstLRRQ2.Text;
            parameters[4].Value = UserAction.UserID;

            parameters[0].Direction = ParameterDirection.Input;
            parameters[1].Direction = ParameterDirection.Input;
            parameters[2].Direction = ParameterDirection.Input;
            parameters[3].Direction = ParameterDirection.Input;
            parameters[4].Direction = ParameterDirection.Input;
            parameters[5].Direction = ParameterDirection.Output;

            try
            {
                DbHelperOra.RunProcedure("STORE.P_DD_AUTO", parameters);

                Alert.Show("自动订货生成成功,单品数:【" + parameters[5].Value.ToString() + "】", "消息提示", MessageBoxIcon.Information);
                OperLog("自动订货", "生成自动订货单据单据");
            }
            catch (Exception err)
            {
                throw err;
            }
        }
Exemple #13
0
        protected void btn_Sure_Click(object sender, EventArgs e)
        {
            if (ddlDeptOrder1.SelectedValue == "" || ddlDeptOrder2.SelectedValue == "")
            {
                Alert.Show("【调出部门】或【调入部门】未维护!", "提示信息", MessageBoxIcon.Warning);
                return;
            }
            if (ddlDeptOrder1.SelectedValue == ddlDeptOrder2.SelectedValue)
            {
                Alert.Show("【调出部门】与【调入部门】不能相同!", "提示信息", MessageBoxIcon.Warning);
                return;
            }
            OracleParameter[] parameters =
            {
                new OracleParameter("VI_DEPTOUT", OracleDbType.Varchar2, 20),
                new OracleParameter("VI_DEPTIN",  OracleDbType.Varchar2, 20),
                new OracleParameter("VI_TYPE",    OracleDbType.Varchar2, 20),
                new OracleParameter("VI_BEG",     OracleDbType.Varchar2, 10),
                new OracleParameter("VI_END",     OracleDbType.Varchar2, 10),
                new OracleParameter("VI_USER",    OracleDbType.Varchar2, 20),
                new OracleParameter("VO_BILLNUM", OracleDbType.Varchar2, 20)
            };
            parameters[0].Value = ddlDeptOrder1.SelectedValue;
            parameters[1].Value = ddlDeptOrder2.SelectedValue;
            parameters[2].Value = rblTYPE.SelectedValue;
            parameters[3].Value = dbpOrder1.Text;
            parameters[4].Value = dbpOrder2.Text;
            parameters[5].Value = UserAction.UserID;

            parameters[0].Direction = ParameterDirection.Input;
            parameters[1].Direction = ParameterDirection.Input;
            parameters[2].Direction = ParameterDirection.Input;
            parameters[3].Direction = ParameterDirection.Input;
            parameters[4].Direction = ParameterDirection.Input;
            parameters[5].Direction = ParameterDirection.Input;
            parameters[6].Direction = ParameterDirection.Output;

            try
            {
                if (DbHelperOra.RunProcedure("STOREDS.P_DB_AUTO", parameters) > 0)
                {
                    Alert.Show("自动调拨单【" + parameters[6].Value + "】生成成功!", "消息提示", MessageBoxIcon.Information);
                }
                else
                {
                    Alert.Show("没有需要生成调拨数据!", "消息提示", MessageBoxIcon.Information);
                }

                WinAuto.Hidden = true;
            }
            catch (Exception err)
            {
                Alert.Show(err.Message);
            }
        }
Exemple #14
0
 /// <summary>
 /// 由临时表写入正式表中
 /// </summary>
 public static int TempToTable(string Billno, string TABLENAME)
 {
     OracleParameter[] parameters = new OracleParameter[]
     {
         new OracleParameter("V_BILLNO", OracleDbType.Varchar2),
         new OracleParameter("V_TABLENAME", OracleDbType.Varchar2),
     };
     parameters[0].Value = Billno;
     parameters[1].Value = TABLENAME;
     DbHelperOra.RunProcedure("P_INS_TABLE", parameters);
     return(1);
 }
Exemple #15
0
        private string submitCart()
        {
            string seqnosTemp = "";

            if (Request.QueryString["seqno"] != null)
            {
                string seqnos = Request.QueryString["seqno"].Trim(',');
                if (seqnos.IndexOf(",") > 0)
                {
                    string[] seqnosArray = seqnos.Split(',');
                    foreach (String seqno in seqnosArray)
                    {
                        seqnosTemp += "'" + seqno + "',";
                    }
                    seqnosTemp = seqnosTemp.Trim(',');
                }
                else
                {
                    seqnosTemp += "'" + seqnos + "'";
                }
            }

            JObject jo = new JObject();

            try
            {
                string            seqno  = BillSeqGet("DHD");
                string            custid = "10009";
                OracleParameter[] param  = { new OracleParameter("VS_USERID",    OracleDbType.Varchar2, 20),
                                             new OracleParameter("VS_SEQNO",      OracleDbType.Varchar2, 20),
                                             new OracleParameter("VS_CUSTID",     OracleDbType.Varchar2, 20),
                                             new OracleParameter("VS_CARTSEQNOS", OracleDbType.Varchar2, 2000) };
                param[0].Direction = ParameterDirection.Input;
                param[0].Value     = UserAction.UserID;
                param[1].Direction = ParameterDirection.Input;
                param[1].Value     = seqno;
                param[2].Direction = ParameterDirection.Input;
                param[2].Value     = custid;
                param[3].Direction = ParameterDirection.Input;
                param[3].Value     = seqnosTemp;

                int result = DbHelperOra.RunProcedure("INFTEMP.P_SAVECARTTODD", param);

                jo.Add("result", "success");
                jo.Add("seqno", seqno);
                jo.Add("custid", custid);
            }
            catch (Exception ex)
            {
                jo.Add("result", "false");
            }
            return(JsonConvert.SerializeObject(jo));
        }
Exemple #16
0
 protected void btnSys_Click(object sender, EventArgs e)
 {
     OracleParameter[] parameters = new OracleParameter[]
     {
         new OracleParameter("V_BILL", OracleDbType.Varchar2),
         new OracleParameter("V_TYPE", OracleDbType.Varchar2),
     };
     parameters[0].Value = "";
     parameters[1].Value = "INSSYS";
     DbHelperOra.RunProcedure("P_ExlGOODS", parameters);
     Alert.Show("导入系统成功!", "消息提示", MessageBoxIcon.Information);
     btnGridOut_Click(null, null);
 }
Exemple #17
0
        protected void btnClosePostBack_Click(object sender, EventArgs e)
        {
            if (DbHelperOra.Exists("SELECT 1 FROM DAT_CK_DOC WHERE SEQNO ='" + hfdDept.Text + "' AND FLAG = 'Y'"))
            {
                Alert.Show("单据已被确认,请检查!", MessageBoxIcon.Warning);
                btnUpt.Hidden = true;
                return;
            }
            //更改预占数
            JArray Jary = GridLot.GetMergedData();

            if (Jary[0]["status"].ToString() != "unchanged")
            {
                Decimal modsl = Convert.ToDecimal(Jary[0]["values"]["XSSL"] ?? "0");
                Decimal kcsl  = Convert.ToDecimal(GridLot.DataKeys[0][0] ?? "0");
                if (kcsl < modsl)
                {
                    Alert.Show("修改商品的预出数不能大于库存!", MessageBoxIcon.Warning);
                    return;
                }
                if (hfdDept.Text.Substring(0, 2) == "DS" && modsl > 0 && modsl.ToString() != GridLot.DataKeys[0][1].ToString())
                {
                    if (modsl.ToString() != GridLot.DataKeys[0][2].ToString())//不等于定数含量
                    {
                        Alert.Show("定数只能整包出库或不出库!", MessageBoxIcon.Warning);
                        return;
                    }
                }
                OracleParameter[] parameters = new OracleParameter[]
                {
                    new OracleParameter("VI_BILLNO", OracleDbType.Varchar2),
                    new OracleParameter("VI_BILLTYPE", OracleDbType.Varchar2),
                    new OracleParameter("VI_ROWNO", OracleDbType.Int32),
                    new OracleParameter("VI_GDSEQ", OracleDbType.Varchar2),
                    new OracleParameter("VI_SLOLD", OracleDbType.Decimal),
                    new OracleParameter("VI_SLNEW", OracleDbType.Decimal)
                };
                parameters[0].Value = hfdDept.Text;
                parameters[1].Value = hfdDept.Text.Substring(0, 3);
                parameters[2].Value = GridGoods.DataKeys[GridGoods.SelectedRowIndex][1];
                parameters[3].Value = GridGoods.DataKeys[GridGoods.SelectedRowIndex][2];
                parameters[4].Value = GridLot.DataKeys[0][1];
                parameters[5].Value = modsl;
                DbHelperOra.RunProcedure("STOCK.P_STOCK_LOCKMOD", parameters);
                DbHelperOra.ExecuteSql(String.Format("UPDATE DAT_CK_COM SET XSSL = {0},bzsl = {0},dhsl = {0},fpsl = {0},hsje = {0}*hsjj WHERE SEQNO = '{1}' AND ROWNO = {2}", modsl, hfdDept.Text, GridGoods.DataKeys[GridGoods.SelectedRowIndex][1]));
                DbHelperOra.ExecuteSql(String.Format("UPDATE DAT_CK_DOC SET SUBSUM = (SELECT SUM(HSJE) FROM DAT_CK_COM WHERE SEQNO ='{0}') WHERE SEQNO ='{0}'", hfdDept.Text));
            }
            WinLot.Hidden = true;
            OperLog("波次拣货", "修改出库数【" + hfdDept.Text + "】");
            DataSearch();
        }
Exemple #18
0
        /// <summary>
        /// 单位卷宗制作情况统计
        /// </summary>
        /// <param name="strWhere">查询条件</param>
        /// <param name="dwbm">单位编码</param>
        /// <param name="gh">工号</param>
        /// <param name="orderby">排序</param>
        /// <param name="startIndex">分页数</param>
        /// <param name="endIndex">每页显示数</param>
        /// <param name="count">返回总数</param>
        /// <param name="objValues">参数值</param>
        /// <returns></returns>
        public DataSet GetDwJzZzStatistics(string strWhere, string strWhereDw, string dwbm, string gh, string jsbm, string bmbm, string orderby, int startIndex, int endIndex, out int count, params object[] objValues)
        {
            OracleParameter[] parameters =
            {
                new OracleParameter("p_dwbm",      OracleType.VarChar,            50),
                new OracleParameter("p_gh",        OracleType.Char,                4),
                new OracleParameter("p_jsbm",      OracleType.VarChar,            50),
                new OracleParameter("p_bmbm",      OracleType.VarChar,            50),
                new OracleParameter("p_where",     OracleType.VarChar,  int.MaxValue),
                new OracleParameter("p_where_dw",  OracleType.VarChar),
                new OracleParameter("p_order",     OracleType.VarChar,           100),
                new OracleParameter("p_pageindex", OracleType.Number),
                new OracleParameter("p_pagesize",  OracleType.Number),
                new OracleParameter("p_count",     OracleType.Number,              8),
                new OracleParameter("p_cursor",    OracleType.Cursor),
                new OracleParameter("p_errmsg",    OracleType.VarChar, 4000)
            };
            parameters[0].Value      = dwbm;
            parameters[1].Value      = gh;
            parameters[2].Value      = jsbm;
            parameters[3].Value      = bmbm;
            parameters[4].Value      = strWhere;
            parameters[5].Value      = strWhereDw;
            parameters[6].Value      = orderby;
            parameters[7].Value      = startIndex;
            parameters[8].Value      = endIndex;
            parameters[9].Direction  = ParameterDirection.Output;
            parameters[10].Direction = ParameterDirection.Output;
            parameters[11].Direction = ParameterDirection.Output;

            try
            {
                DataSet ds = DbHelperOra.RunProcedure("pkg_dzjz_report.proc_report_dwjzzztj", parameters, "proc_report_dwjzzztj");
                if (parameters[9].Value != DBNull.Value)
                {
                    count = Convert.ToInt32(parameters[9].Value);
                }
                else
                {
                    count = 0;
                }
                return(ds);
            }
            catch (Exception ex)
            {
                EDRS.Common.LogHelper.LogError(this.context, "Exception", ex.Message, "public DataSet GetDwJzZzStatistics(string strWhere, string orderby, int startIndex, int endIndex, params object[] objValues)", "EDRS.OracleDAL.DataStatistics", "pkg_dzjz_report.proc_report_dwjzzztj", parameters);
            }
            count = 0;
            return(null);
        }
Exemple #19
0
        private void saveLog()
        {
            OracleParameter[] param =
            {
                new OracleParameter("VS_SEQNO",  OracleDbType.Varchar2, 40),
                new OracleParameter("VS_CUSTID", OracleDbType.Varchar2, 20)
            };
            param[0].Direction = ParameterDirection.Input;
            param[0].Value     = SeqNo;
            param[1].Direction = ParameterDirection.Input;
            param[1].Value     = CustId;

            DbHelperOra.RunProcedure("BILLSTATUS.P_LOG", param);
        }
Exemple #20
0
        public DataSet GetCaseByPerson(string groupType, string strWhere, string roleDwbmWhere, int pageSize, int pageIndex, string orderby, out int count, params object[] objValues)
        {
            OracleParameter[] parameters =
            {
                new OracleParameter("p_where",     OracleType.VarChar, 1000),
                new OracleParameter("p_rwhere",    OracleType.VarChar, 1000),
                new OracleParameter("p_order",     OracleType.VarChar, 1000),
                new OracleParameter("p_pageindex", OracleType.Number),
                new OracleParameter("p_pagesize",  OracleType.Number),
                new OracleParameter("p_count",     OracleType.Number,     8),
                new OracleParameter("p_cursor",    OracleType.Cursor),
                new OracleParameter("p_errmsg",    OracleType.VarChar, 100)
            };

            parameters[0].Value     = strWhere;
            parameters[1].Value     = roleDwbmWhere;
            parameters[2].Value     = orderby;
            parameters[3].Value     = pageIndex;
            parameters[4].Value     = pageSize;
            parameters[5].Direction = ParameterDirection.Output;
            parameters[6].Direction = ParameterDirection.Output;
            parameters[7].Direction = ParameterDirection.Output;

            try
            {
                //根据业务
                string proc = "proc_report_getcasebypersonB";
                //根据类型
                if (groupType == "groupByType")
                {
                    proc = "proc_report_getcasebypersonL";
                }
                DataSet ds = null;
                ds    = DbHelperOra.RunProcedure("pkg_dzjz_report." + proc, parameters, proc);
                count = Convert.ToInt32(parameters[5].Value);
                return(ds);
            }
            catch (Exception ex)
            {
                EDRS.Common.LogHelper.LogError(this.context, "Exception", ex.Message, "public DataSet GetCaseByPerson(string strWhere, string roleDwbmWhere, int pageSize, int pageIndex, string orderby, out int count, params object[] objValues)", "EDRS.OracleDAL.DataStatistics", "pkg_dzjz_report.proc_report_jznumber", parameters);
            }
            count = 0;
            return(null);
        }
Exemple #21
0
        protected void btnCreate_Click(object sender, EventArgs e)
        {
            int[] selections = GridLeft.SelectedRowIndexArray;
            if (selections.Count() < 1)
            {
                Alert.Show("请选择需要转为出库单的商品!", "提示信息", MessageBoxIcon.Warning);
                return;
            }
            List <CommandInfo> cmdList = new List <CommandInfo>();
            string             SEQ     = DbHelperOra.GetSingle("SELECT SEQ_PUBLIC.NEXTVAL FROM DUAL").ToString();

            foreach (int rowIndex in selections)
            {
                //增加库存数量的判断
                if (Convert.ToDecimal(GridLeft.DataKeys[rowIndex][2]) > Convert.ToDecimal(GridLeft.DataKeys[rowIndex][3]))
                {
                    Alert.Show("第【" + (rowIndex + 1) + "】行商品,库存数不足以出库,,请检查!");
                    return;
                }
                cmdList.Add(new CommandInfo(string.Format("UPDATE DAT_JH_COM SET NUM1 = {0} WHERE SEQNO = '{1}' AND ROWNO = {2} AND NVL(STR1,'#') = '#'", SEQ, GridLeft.DataKeys[rowIndex][0], GridLeft.DataKeys[rowIndex][1]), null));
            }
            if (DbHelperOra.ExecuteSqlTran(cmdList))
            {
                OracleParameter[] parameters =
                {
                    new OracleParameter("VIN_SEQ",      OracleDbType.Varchar2, 10),
                    new OracleParameter("VIN_OPERUSER", OracleDbType.Varchar2, 10),
                };
                parameters[0].Value = SEQ;
                parameters[1].Value = UserAction.UserID;
                try
                {
                    DbHelperOra.RunProcedure("STORE.P_BowToCk", parameters);
                    Alert.Show("借条转出库单生成成功!", "消息提示", MessageBoxIcon.Information);
                    billSearch();
                    TabStrip1.ActiveTabIndex = 1;
                }
                catch (Exception err)
                {
                    throw err;
                }
            }
        }
Exemple #22
0
 /// <summary>
 /// 分页获取数据列表
 /// </summary>
 public DataSet GetListByPageProc(DateTime startTime, DateTime endTime, string strWhere, string orderby, int startIndex, int endIndex, ref int count)
 {
     OracleParameter[] parameters =
     {
         //new OracleParameter("p_starttime",OracleType.DateTime),
         //new OracleParameter("p_endtime",OracleType.DateTime),
         new OracleParameter("p_where",     OracleType.VarChar, int.MaxValue),
         new OracleParameter("p_order",     OracleType.VarChar,          500),
         new OracleParameter("p_pagesize",  OracleType.Number),
         new OracleParameter("p_pageindex", OracleType.Number),
         new OracleParameter("p_count",     OracleType.Number,             8),
         new OracleParameter("p_cursor",    OracleType.Cursor),
         new OracleParameter("p_errmsg",    OracleType.VarChar, 512)
     };
     //parameters[0].Value = startTime;
     //parameters[1].Value = endTime;
     parameters[0].Value     = strWhere;
     parameters[1].Value     = orderby;
     parameters[2].Value     = endIndex;
     parameters[3].Value     = startIndex;
     parameters[4].Direction = ParameterDirection.Output;
     parameters[5].Direction = ParameterDirection.Output;
     parameters[6].Direction = ParameterDirection.Output;
     try
     {
         DataSet ds = DbHelperOra.RunProcedure("pkg_zzjg_manage.proc_get_jzrzjl", parameters, "proc_get_jzrzjl");
         if (ds != null && ds.Tables.Count > 0)
         {
             count = Convert.ToInt32(parameters[4].Value);
             return(ds);
         }
         if (parameters[6].Value != null)
         {
             EDRS.Common.LogHelper.LogError(this.context, "Exception", parameters[6].Value.ToString(), "public DataSet GetListByPageProc(string strWhere, string orderby, int startIndex, int endIndex, ref int count)", "EDRS.OracleDAL.YX_DZJZ_JZRZJL", "PKG_ZZJG_MANAGE.PROC_GET_JZRZJL", parameters);
         }
     }
     catch (Exception ex)
     {
         EDRS.Common.LogHelper.LogError(this.context, "Exception", ex.Message, "public DataSet GetListByPageProc(string strWhere, string orderby, int startIndex, int endIndex, ref int count)", "EDRS.OracleDAL.YX_DZJZ_JZRZJL", "PKG_ZZJG_MANAGE.PROC_GET_JZRZJL", parameters);
     }
     return(null);
 }
Exemple #23
0
        protected void btn_Auto_Click(object sender, EventArgs e)
        {
            if (DbHelperOra.Exists("SELECT 1 FROM DOC_EVALUATION WHERE FLAG = 'N'"))
            {
                Alert.Show("评价项目未审核确认,请检查!", "提示信息", MessageBoxIcon.Warning);
                return;
            }
            OracleParameter[] parameters =
            {
                new OracleParameter("VI_USER", OracleDbType.Varchar2, 20),
                new OracleParameter("VO_NUM",  OracleDbType.Int32)
            };
            parameters[0].Value = UserAction.UserID;

            parameters[0].Direction = ParameterDirection.Input;
            parameters[1].Direction = ParameterDirection.Output;

            try
            {
                DbHelperOra.RunProcedure("STORE.P_PJ_AUTO", parameters);
                if (!PubFunc.StrIsEmpty(parameters[1].Value.ToString()) && parameters[1].Value.ToString().ToLower() != "null")
                {
                    if ("0".Equals(parameters[1].Value.ToString()))
                    {
                        Alert.Show("暂时没有需要生成评价的科室!", "消息提示", MessageBoxIcon.Information);
                    }
                    else
                    {
                        Alert.Show(string.Format("科室评价生成成功,条目数:【{0}】", parameters[1].Value.ToString()), "消息提示", MessageBoxIcon.Information);
                    }
                }
                else
                {
                    Alert.Show("暂时没有需要生成评价的科室!", "消息提示", MessageBoxIcon.Information);
                }
            }
            catch (Exception err)
            {
                Alert.Show(err.Message, "错误提示", MessageBoxIcon.Warning);
            }
        }
Exemple #24
0
 protected void GridList_RowCommand(object sender, GridCommandEventArgs e)
 {
     if (e.CommandName == "TODOLINK")
     {
         GridRow row = GridToDoList.Rows[e.RowIndex];
         string  url = row.Values[3].ToString();
         if (url.IndexOf('?') > 0)
         {
             url += "&pid=" + row.Values[4].ToString();
         }
         else
         {
             url += "?pid=" + row.Values[4].ToString();
         }
         url = url.Substring(1);
         PageContext.RegisterStartupScript("openTODOLINK('" + row.Values[1].ToString() + "','" + url + "','" + row.Values[2].ToString() + "')");
         //PageContext.RegisterStartupScript(mainTabStrip.GetRemoveTabReference(row.Values[1].ToString()) + mainTabStrip.GetAddTabReference(row.Values[1].ToString(), url, row.Values[2].ToString(), "~/extjs/res/ext-theme-classic/images/tree/leaf.gif", true));
     }
     else if (e.CommandName == "YUJING")
     {
         GridRow  row  = GridYuJing.Rows[e.RowIndex];
         string[] para = row.DataKeys[0].ToString().Split(',');
         if (para.Length != 5)
         {
             return;
         }
         if (para[4] == "0")
         {
             OracleParameter[] parameters_db =
             {
                 new OracleParameter("V_SEQNO",  OracleDbType.Varchar2),
                 new OracleParameter("V_USERID", OracleDbType.Varchar2)
             };
             parameters_db[0].Value = para[0];
             parameters_db[1].Value = UserAction.UserID;
             DbHelperOra.RunProcedure("MAINT.P_DO_EXEC", parameters_db);
         }
         string url = para[2].Substring(1);
         PageContext.RegisterStartupScript("openTODOLINK('" + para[1] + "','" + url + "','" + para[3] + "')");
     }
 }
Exemple #25
0
        /// <summary>
        /// 批量插入数据。 先清临时表,bulkcopy到临时表,再调存储过程插入到正式表
        /// </summary>
        /// <param name="tableName"></param>
        /// <param name="dt"></param>
        /// <param name="procedureName"></param>
        private void bulkInsert(String tableName, DataTable dt, String procedureName)
        {
            String sql = "delete from " + tableName + " where custid = '" + CustId + "' and ddbh='" + SeqNo + "'";

            DbHelperOra.ExecuteSql(sql);
            ApiUtil.BulkInsert(tableName, dt);
            if (!String.IsNullOrWhiteSpace(procedureName))
            {
                OracleParameter[] param =
                {
                    new OracleParameter("VS_SEQNO",  OracleDbType.Varchar2, 40),
                    new OracleParameter("VS_CUSTID", OracleDbType.Varchar2, 20)
                };
                param[0].Direction = ParameterDirection.Input;
                param[0].Value     = SeqNo;
                param[1].Direction = ParameterDirection.Input;
                param[1].Value     = CustId;

                DbHelperOra.RunProcedure(procedureName, param);
            }
        }
Exemple #26
0
        protected void zsmScan_TextChanged(object sender, EventArgs e)
        {
            if ((",M,R,N,A").IndexOf(docFLAG.SelectedValue) < 0)
            {
                Alert.Show("非『新单』单据不允许操作!", "消息提示", MessageBoxIcon.Warning);
                return;
            }

            if (!DbHelperOra.Exists(string.Format("SELECT 1 FROM DAT_GZ_EXT WHERE ONECODE = '{0}'  AND FLAG IN( 'Y','R')", zsmScan.Text)))
            {
                Alert.Show("您输入的追溯码已扫描使用,请检查!", "提示信息", MessageBoxIcon.Warning);
                zsmScan.Text = string.Empty;
                zsmScan.Focus();
                return;
            }
            if (DbHelperOra.Exists(string.Format("SELECT 1 FROM DAT_DB_EXT WHERE ONECODE = '{0}'  AND billno='{1}'", zsmScan.Text, docBILLNO.Text)))
            {
                Alert.Show("您输入的追溯码已扫描使用,请检查!", "提示信息", MessageBoxIcon.Warning);
                zsmScan.Text = string.Empty;
                zsmScan.Focus();
                return;
            }
            try {
                //写入数据库中
                OracleParameter[] parameters = new OracleParameter[]
                {
                    new OracleParameter("V_BILLNO", OracleDbType.Varchar2),
                    new OracleParameter("V_ONECODE", OracleDbType.Varchar2),
                };
                parameters[0].Value = docSEQNO.Text;
                parameters[1].Value = zsmScan.Text;
                DbHelperOra.RunProcedure("STOREDS.P_INS_DBD", parameters);
                billOpen(docBILLNO.Text);
                ScanSearch("");
            }
            catch (Exception ex)
            {
                Alert.Show(ERPUtility.errorParse(ex.Message), "消息提示", MessageBoxIcon.Warning);
            }
        }
Exemple #27
0
        /// <summary>
        /// 单位卷宗制作查询
        /// </summary>
        /// <param name="strWhere">查询条件</param>
        /// <param name="dwbm">单位编码</param>
        /// <param name="gh">工号</param>
        /// <param name="orderby">排序</param>
        /// <param name="startIndex">分页数</param>
        /// <param name="endIndex">每页显示数</param>
        /// <param name="count">返回总数</param>
        /// <param name="objValues">参数值</param>
        /// <returns></returns>
        public DataSet GetDwJzZzQuery(string strWhere, string dwbm, string gh, string orderby, int startIndex, int endIndex, out int count, params object[] objValues)
        {
            OracleParameter[] parameters =
            {
                new OracleParameter("p_dwbm",      OracleType.VarChar,   50),
                new OracleParameter("p_gh",        OracleType.Char,       4),
                new OracleParameter("p_where",     OracleType.VarChar, 4000),
                new OracleParameter("p_order",     OracleType.VarChar,  100),
                new OracleParameter("p_pageindex", OracleType.Number),
                new OracleParameter("p_pagesize",  OracleType.Number),
                new OracleParameter("p_count",     OracleType.Number,     8),
                new OracleParameter("p_cursor",    OracleType.Cursor),
                new OracleParameter("p_errmsg",    OracleType.VarChar, 500)
            };
            parameters[0].Value     = dwbm;
            parameters[1].Value     = gh;
            parameters[2].Value     = strWhere;
            parameters[3].Value     = orderby;
            parameters[4].Value     = startIndex;
            parameters[5].Value     = endIndex;
            parameters[6].Direction = ParameterDirection.Output;
            parameters[7].Direction = ParameterDirection.Output;
            parameters[8].Direction = ParameterDirection.Output;

            try
            {
                DataSet ds = DbHelperOra.RunProcedure("pkg_dzjz_report.proc_report_dwjzzzcx", parameters, "proc_report_dwjzzzcx");
                count = Convert.ToInt32(parameters[6].Value);
                //OracleParameter op = parameters.FirstOrDefault(d => d.ParameterName == "p_count1");//.Value.ToString();
                //if (op != null)
                //    count = Convert.ToInt32(op.Value);
                return(ds);
            }
            catch (Exception ex)
            {
                EDRS.Common.LogHelper.LogError(this.context, "Exception", ex.Message, "public DataSet GetDwJzZzQuery(string strWhere, string orderby, int startIndex, int endIndex, params object[] objValues)", "EDRS.OracleDAL.DataStatistics", "pkg_dzjz_report.proc_report_dwjzzzcx", parameters);
            }
            count = 0;
            return(null);
        }
Exemple #28
0
        protected void GoodsStatusOper(String type, String flag)
        {
            int[] selectsAll           = GridGoods.SelectedRowIndexArray;
            List <CommandInfo> cmdList = new List <CommandInfo>();
            String             Gdseq   = "";

            foreach (int selects in selectsAll)
            {
                Gdseq += GridGoods.DataKeys[selects][0] + ",";
            }
            if (Gdseq.Length < 1)
            {
                Alert.Show("请选择需要操作的商品!", MessageBoxIcon.Warning);
                return;
            }
            OracleParameter[] parameters =
            {
                new OracleParameter("VI_GOODS_LIST", OracleDbType.Varchar2),
                new OracleParameter("VI_TYPE",       OracleDbType.Varchar2,1),
                new OracleParameter("VO_MSG",        OracleDbType.Varchar2)
            };
            parameters[0].Value = Gdseq.TrimEnd(',');
            parameters[1].Value = flag;

            parameters[0].Direction = ParameterDirection.Input;
            parameters[1].Direction = ParameterDirection.Input;
            parameters[2].Direction = ParameterDirection.Output;

            try
            {
                DbHelperOra.RunProcedure("P_GOODS_INS", parameters);
                Alert.Show("商品【" + type + "】成功!", "消息提示", MessageBoxIcon.Information);
            }
            catch (Exception err)
            {
                Alert.Show(err.Message, "提示信息", MessageBoxIcon.Warning);
            }
            dataSearch();
        }
Exemple #29
0
 private void FP_Action()
 {
     //进行库存分配
     if (docFLAG.SelectedValue == "A")
     {
         OracleParameter[] parameters = new OracleParameter[]
         {
             new OracleParameter("BILLNO", OracleDbType.Varchar2),
             new OracleParameter("USERID", OracleDbType.Varchar2),
         };
         parameters[0].Value = docSEQNO.Text;
         parameters[1].Value = UserAction.UserID;
         DbHelperOra.RunProcedure("P_EXE_DBD", parameters);
         billOpen(docSEQNO.Text);
         Alert.Show("库存分配成功!");
     }
     else
     {
         Alert.Show("单据状态不正确,不能进行库存分配!");
         return;
     }
 }
Exemple #30
0
        protected void btnAuditBatch_Click(object sender, EventArgs e)
        {
            int[]  rowIndex = GridList.SelectedRowIndexArray;
            string billno   = docBILLNO.Text;

            if (billno.Length == 0)
            {
                Alert.Show("请选择要审核的库房调拨信息!", "消息提示", MessageBoxIcon.Warning);
                return;
            }


            if (billno.Length > 0)
            {
                string StrSql = "UPDATE DAT_DB_DOC SET FLAG = 'A' where seqno = '" + billno.TrimEnd(',') + "'";
                DbHelperOra.ExecuteSql(StrSql);
                docFLAG.SelectedValue = DbHelperOra.GetSingle("SELECT FLAG FROM DAT_DB_DOC WHERE SEQNO='" + billno.TrimEnd(',') + "'").ToString();
                if (docFLAG.SelectedValue == "A")
                {
                    OracleParameter[] parameters = new OracleParameter[]
                    {
                        new OracleParameter("BILLNO", OracleDbType.Varchar2),
                        new OracleParameter("USERID", OracleDbType.Varchar2),
                    };
                    parameters[0].Value = docSEQNO.Text;
                    parameters[1].Value = UserAction.UserID;
                    DbHelperOra.RunProcedure("P_EXE_DBD", parameters);
                }
                else
                {
                    Alert.Show("单据状态不正确,不能进行库存分配!");
                    return;
                }
                Alert.Show("商品调拨申请提交成功!", "消息提示", MessageBoxIcon.Information);
                billSearch();
                OperLog("商品调拨", "提交单据【" + billno.TrimEnd(',') + "】-高值扫码");
            }
        }