/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string QXBM) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from XT_QX_JSANQX"); strSql.Append(" where QXBM=:QXBM "); OracleParameter[] parameters = { new OracleParameter(":QXBM", OracleType.VarChar, 50) }; parameters[0].Value = QXBM; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string CLIENTID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from CLIENTDB"); strSql.Append(" where CLIENTID=:CLIENTID "); OracleParameter[] parameters = { new OracleParameter(":CLIENTID", OracleType.Char, 4) }; parameters[0].Value = CLIENTID; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 判断过关注单是否存在 /// </summary> /// <param name="s_xzdh"></param> /// <returns></returns> public bool Exists(string s_xzdh) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from KFB_PTZD"); strSql.Append(" where N_XZDH=:N_XZDH"); OracleParameter[] parameters = { new OracleParameter(":N_XZDH", OracleType.VarChar, 100) }; parameters[0].Value = s_xzdh; return(DbHelperOra.Exists(conn, tran, strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string HK_APP_REF) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from EX_HKCASE"); strSql.Append(" where HK_APP_REF=:HK_APP_REF "); OracleParameter[] parameters = { new OracleParameter(":HK_APP_REF", OracleType.VarChar, 30) }; parameters[0].Value = HK_APP_REF; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string TASK_GUID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from TASK"); strSql.Append(" where TASK_GUID=:TASK_GUID "); OracleParameter[] parameters = { new OracleParameter(":TASK_GUID", OracleType.VarChar, 100) }; parameters[0].Value = TASK_GUID; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string NOTENUMBER) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from BILL"); strSql.Append(" where NOTENUMBER=:NOTENUMBER "); OracleParameter[] parameters = { new OracleParameter(":NOTENUMBER", OracleType.VarChar, 23) }; parameters[0].Value = NOTENUMBER; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string OURNO) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from TMCASE"); strSql.Append(" where OURNO=:OURNO "); OracleParameter[] parameters = { new OracleParameter(":OURNO", OracleType.VarChar, 18) }; parameters[0].Value = OURNO; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string NAME) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from COUNTRY_TRANSLATION"); strSql.Append(" where NAME=:NAME "); OracleParameter[] parameters = { new OracleParameter(":NAME", OracleType.VarChar, 30) }; parameters[0].Value = NAME; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string FEEID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from BILLFEEMNT"); strSql.Append(" where FEEID=:FEEID "); OracleParameter[] parameters = { new OracleParameter(":FEEID", OracleType.VarChar, 50) }; parameters[0].Value = FEEID; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
protected void zsmScan_TextChanged(object sender, EventArgs e) { if ((",M,N").IndexOf(docFLAG.SelectedValue) < 0) { Alert.Show("非『新单』单据不允许操作!", "消息提示", MessageBoxIcon.Warning); return; } if (zsmScan.Text.Length < 28) { return; } if (zsmScan.Text.Substring(0, 1) != "2") { Alert.Show("您扫描的条码不是贵重码,请检查!", "提示信息", MessageBoxIcon.Warning); zsmScan.Text = string.Empty; zsmScan.Focus(); return; } if (!DbHelperOra.Exists(string.Format("SELECT 1 FROM DAT_RK_EXT WHERE ONECODE = '{0}' AND FLAG = 'Y'", zsmScan.Text))) { Alert.Show("您输入的追溯码未被使用或已退货,请检查!", "提示信息", MessageBoxIcon.Warning); zsmScan.Text = string.Empty; zsmScan.Focus(); return; } if (DbHelperOra.Exists(string.Format("SELECT 1 FROM DAT_CK_EXT WHERE ONECODE = '{0}' AND BILLNO ='{1}' AND FLAG = 'Y'", zsmScan.Text, docBILLNO.Text))) { Alert.Show("您输入的追溯码已扫描使用,请检查!", "提示信息", MessageBoxIcon.Warning); zsmScan.Text = string.Empty; zsmScan.Focus(); return; } //增加判断防止同一条条码同时写入两次 BY CONGWM 2016/10/18 if (DbHelperOra.Exists(string.Format("SELECT 1 FROM DAT_CK_EXT WHERE ONECODE = '{0}' AND BILLNO ='{1}'", zsmScan.Text, docBILLNO.Text))) { Alert.Show("您输入的追溯码已经转出库或在列表中,请检查!", "提示信息", MessageBoxIcon.Warning); zsmScan.Text = string.Empty; zsmScan.Focus(); return; } //写入数据库中 string sSQL = string.Format(@"INSERT INTO DAT_CK_EXT(DEPTID,BILLNO,ROWNO,ONECODE,GDSEQ,GDNAME,BARCODE,UNIT,GDSPEC,DEPTCUR,BZHL,INSTIME,FLAG,PH,RQ_SC,YXQZ) SELECT '{0}','{1}',NVL((SELECT MAX(ROWNO)+1 FROM DAT_CK_EXT WHERE BILLNO = '{1}'),1),'{2}',GDSEQ,GDNAME,BARCODE,UNIT,GDSPEC,DEPTCUR,BZHL,SYSDATE,'N',PH,RQ_SC,YXQZ FROM DAT_RK_EXT A WHERE A.ONECODE = '{2}' ", docDEPTID.SelectedValue, docBILLNO.Text, zsmScan.Text.Trim()); DbHelperOra.ExecuteSql(sSQL); ScanSearch(""); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string BM) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from YX_DZJZ_FMDYMB"); strSql.Append(" where BM=:BM "); OracleParameter[] parameters = { new OracleParameter(":BM", OracleType.NVarChar) }; parameters[0].Value = BM; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(decimal ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from ST_MEASURE"); strSql.Append(" where ID=:ID "); OracleParameter[] parameters = { new OracleParameter(":ID", OracleDbType.Int32, 22) }; parameters[0].Value = ID; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string TYPENAME) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from SBFEETYPE"); strSql.Append(" where TYPENAME=:TYPENAME "); OracleParameter[] parameters = { new OracleParameter(":TYPENAME", OracleType.VarChar, 40) }; parameters[0].Value = TYPENAME; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string FNAME) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from FBKUPINFO"); strSql.Append(" where FNAME=:FNAME "); OracleParameter[] parameters = { new OracleParameter(":FNAME", OracleType.VarChar, 200) }; parameters[0].Value = FNAME; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string PID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from FCASE_INVENTORS"); strSql.Append(" where PID=:PID "); OracleParameter[] parameters = { new OracleParameter(":PID", OracleType.VarChar, 20) }; parameters[0].Value = PID; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from SIMPLECOMMANDS"); strSql.Append(" where ID=:ID "); OracleParameter[] parameters = { new OracleParameter(":ID", OracleType.VarChar, 50) }; parameters[0].Value = ID; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string HKNO) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from DROPPING_HKPATENT"); strSql.Append(" where HKNO=:HKNO "); OracleParameter[] parameters = { new OracleParameter(":HKNO", OracleType.VarChar, 30) }; parameters[0].Value = HKNO; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(DateTime CREATED) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from GENERALALERT"); strSql.Append(" where CREATED=:CREATED "); OracleParameter[] parameters = { new OracleParameter(":CREATED", OracleType.DateTime) }; parameters[0].Value = CREATED; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string GROUPID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from ALERTTYPEGROUP"); strSql.Append(" where GROUPID=:GROUPID "); OracleParameter[] parameters = { new OracleParameter(":GROUPID", OracleType.VarChar, 20) }; parameters[0].Value = GROUPID; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string PAPER_NAME) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from PAPER_SIZE"); strSql.Append(" where PAPER_NAME=:PAPER_NAME "); OracleParameter[] parameters = { new OracleParameter(":PAPER_NAME", OracleType.VarChar, 100) }; parameters[0].Value = PAPER_NAME; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string BILLTYPE) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from BILLTYPE"); strSql.Append(" where BILLTYPE=:BILLTYPE "); OracleParameter[] parameters = { new OracleParameter(":BILLTYPE", OracleType.VarChar, 15) }; parameters[0].Value = BILLTYPE; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
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(); }
protected override void billAudit() { if (docFLAG.SelectedValue != "A") { Alert.Show("单据状态非新增,不能审核!", "操作提示", MessageBoxIcon.Warning); return; } //验证科室是否盘点 if (DbHelperOra.Exists("SELECT 1 FROM DAT_PD_LOCK WHERE DEPTID IN('" + docDEPTOUT.SelectedValue + "','" + docDEPTID.SelectedValue + "') AND FLAG='N'")) { Alert.Show("库房正在盘点,请检查!"); return; } //string strBillno = docSEQNO.Text; //if (BillOper(strBillno, "AUDIT") == 1) //{ // billLockDoc(true); // Alert.Show("单据【" + strBillno + "】审核成功!"); // billOpen(strBillno); // OperLog("直接出库", "审核单据【" + docSEQNO.Text + "】"); //} StringBuilder sbSql = new StringBuilder(); // sbSql.AppendFormat(@"DECLARE // BEGIN // DELETE FROM DAT_DB_EXT T WHERE T.BILLNO ='{0}'; // INSERT INTO DAT_DB_EXT(DEPTID,BILLNO,ROWNO,ONECODE,GDSEQ,GDNAME,BARCODE,UNIT,GDSPEC,DEPTCUR,BZHL,FLAG,PH,RQ_SC,YXQZ) // SELECT '{3}','{0}',ROWNUM,A.STR2,A.GDSEQ,A.GDNAME,A.BARCODE,A.UNIT,A.GDSPEC,'{3}',A.BZHL,'Y',A.PH,A.RQ_SC,A.YXQZ // FROM DAT_DB_COM A WHERE A.SEQNO = '{0}'; // IF SQL%ROWCOUNT = 0 THEN // RAISE_APPLICATION_ERROR(-20001, '修改单据[{0}]标志不成功!'); // END IF; // STORE.P_BILLOPER('{0}', '{1}', '{2}', 'AUDIT'); // END; ", docSEQNO.Text, BillType, UserAction.UserID, docDEPTID.SelectedValue); sbSql.AppendFormat(@"DECLARE BEGIN STORE.P_BILLOPER('{0}','{1}','{2}','AUDIT'); END;", docSEQNO.Text, BillType, UserAction.UserID, docDEPTID.SelectedValue); try { DbHelperOra.ExecuteSql(sbSql.ToString()); billLockDoc(true); Alert.Show("单据【" + docSEQNO.Text + "】审核成功!", "消息提示", MessageBoxIcon.Information); OperLog("商品调拨", "审核单据【" + docSEQNO.Text + "】-高值扫码出库"); billOpen(docSEQNO.Text); } catch (Exception ex) { Alert.Show(ERPUtility.errorParse(ex.Message), "消息提示", MessageBoxIcon.Warning); } }
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"); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(decimal userID, string NAME) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from ST_SUITCLASS"); strSql.Append(" where USERID=:USERID and NAME=:NAME"); OracleParameter[] parameters = { new OracleParameter(":USERID", OracleDbType.Int32, 22), new OracleParameter(":NAME", OracleDbType.Varchar2, 22) }; parameters[0].Value = userID; parameters[1].Value = NAME; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
private void Match(int ExlIndex, string HisCode, string Bill, string Gdseq) { //增加判断此HISCODE是否已经匹配 if (DbHelperOra.Exists(string.Format("SELECT 1 FROM DOC_GOODS WHERE GDSEQ <>'{0}' AND NVL(HISCODE,'#') = '{1}'", Gdseq, HisCode))) { Alert.Show("HIS编码【" + HisCode + "】已经匹配另外商品,请检查", "提示信息", MessageBoxIcon.Warning); return; } //string scprit = Confirm.GetShowReference("您是否为商品匹配ERP编码", "提示!", MessageBoxIcon.Question, PageManager1.GetCustomEventReference("OK"), PageManager1.GetCustomEventReference("Cancel")); //FineUIPro.PageContext.RegisterStartupScript(scprit); DbHelperOra.ExecuteSql(string.Format(@"UPDATE DAT_UPLOAD_GOODS SET FLAG = 'Y',PPMODE='3',UPTTIME = sysdate,GDSEQ = '{0}' WHERE SEQNO ='{1}' AND HISCODE = '{2}' AND FLAG = 'N'", Gdseq, Bill, HisCode)); SearchOne(); btnGridOut_Click(null, null); }
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; } }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string CASENO, string INFOTYPE) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from CASEOTHERTEXT"); strSql.Append(" where CASENO=:CASENO and INFOTYPE=:INFOTYPE "); OracleParameter[] parameters = { new OracleParameter(":CASENO", OracleType.VarChar, 20), new OracleParameter(":INFOTYPE", OracleType.VarChar, 10) }; parameters[0].Value = CASENO; parameters[1].Value = INFOTYPE; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string FILE_NAME, string BOOKMARK) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from WORD_BOOKMARKS"); strSql.Append(" where FILE_NAME=:FILE_NAME and BOOKMARK=:BOOKMARK "); OracleParameter[] parameters = { new OracleParameter(":FILE_NAME", OracleType.VarChar, 100), new OracleParameter(":BOOKMARK", OracleType.VarChar, 50) }; parameters[0].Value = FILE_NAME; parameters[1].Value = BOOKMARK; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(string JOBID, string INCIDENT) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from JOBINCIDENT"); strSql.Append(" where JOBID=:JOBID and INCIDENT=:INCIDENT "); OracleParameter[] parameters = { new OracleParameter(":JOBID", OracleType.VarChar, 50), new OracleParameter(":INCIDENT", OracleType.VarChar, 20) }; parameters[0].Value = JOBID; parameters[1].Value = INCIDENT; return(DbHelperOra.Exists(strSql.ToString(), parameters)); }