コード例 #1
0
ファイル: Frm_RegisterPay.cs プロジェクト: radtek/Brown
        private void Frm_RegisterPay_Load(object sender, EventArgs e)
        {
            string s_rc130 = string.Empty;

            rc001 = this.swapdata["RC001"].ToString();

            OracleDataReader reader = SqlAssist.ExecuteReader("select * from rc01 where rc001='" + rc001 + "'");

            while (reader.Read())
            {
                txtEdit_rc001.Text      = rc001;
                txtEdit_rc109.EditValue = reader["RC109"];
                txtEdit_rc003.EditValue = reader["RC003"];
                txtEdit_rc303.EditValue = reader["RC303"];
                txtEdit_rc004.EditValue = reader["RC004"];
                txtEdit_rc404.EditValue = reader["RC404"];
                rg_rc002.EditValue      = reader["RC002"];
                rg_rc202.EditValue      = reader["RC202"];
                be_position.Text        = RegisterAction.GetRegPathName(rc001);

                s_rc130  = reader["RC130"].ToString();
                bitprice = Convert.ToDecimal(SqlAssist.ExecuteScalar("select bi009 from bi01 where bi001='" + s_rc130 + "'", null));
                txtedit_price.EditValue = bitprice;
            }

            rc04Adapter.SelectCommand.CommandText = "select * from v_rc04 where rc001='" + rc001 + "' order by rc020";
            rc04Adapter.Fill(dt_rc04);
            gridControl1.DataSource = dt_rc04;

            comboBox1.Text = "";
        }
コード例 #2
0
ファイル: PrintAction.cs プロジェクト: anrk0451/Olive
        /// <summary>
        /// 打印管理费缴费记录
        /// </summary>
        /// <param name="fa001"></param>
        public static void PrintPayRecord(string fa001)
        {
            string s_ac001   = SqlAssist.ExecuteScalar("select ac001 from fa01 where fa001='" + fa001 + "'").ToString();
            int    i_orderId = Convert.ToInt32(SqlAssist.ExecuteScalar("select count(*) from pr01 where ac001 = '" + s_ac001 + "' and pr002 < (select pr002 from pr01 where pr001='" + fa001 + "')"));

            PrintPayRecord(s_ac001, i_orderId + 1);
        }
コード例 #3
0
        /// <summary>
        /// 打印寄存 续存记录
        /// </summary>
        /// <param name="settleId"></param>
        public static void PrtRegisterPayRecord(string settleId, int whandle)
        {
            string          sql        = @"select max(rc200) rc200,
								  min(rc020) rc020,
								  max(rc022) rc022,
								  sum(nums) nums,
								  sum(rc030) rc030,
								  min(rc100) rc100,
								  rc001,
								  rc010
                             from rc04 where rc010 = :rc010 group by rc001,rc010";
            OracleCommand   oc_command = new OracleCommand(sql, SqlAssist.conn);
            OracleParameter op_rc010   = new OracleParameter("rc010", OracleDbType.Varchar2, 10);

            op_rc010.Direction = ParameterDirection.Input;
            op_rc010.Value     = settleId;
            oc_command.Parameters.Add(op_rc010);

            OracleDataReader reader = oc_command.ExecuteReader();
            StringBuilder    sb_1   = new StringBuilder(100);

            if (reader.HasRows && reader.Read())
            {
                string s_jbrq  = string.Format("{0:yyyy-MM-dd}", reader["RC200"]);
                string s_begin = string.Format("{0:yyyy-MM-dd}", reader["RC020"]);
                string s_end   = string.Format("{0:yyyy-MM-dd}", reader["RC022"]);
                string s_rc001 = reader["RC001"].ToString();

                sb_1.Append(s_jbrq + "\t");                                                                     // 经办日期
                sb_1.Append(s_begin + "\t");                                                                    // 寄存开始日期
                sb_1.Append(s_end + "\t");                                                                      // 寄存终止日期
                sb_1.Append(RegisterAction.isIncludeLamp(settleId)? "送灯\t" : reader["NUMS"].ToString() + "\t"); // 缴费年限
                sb_1.Append(reader["RC030"].ToString() + "\t");                                                 // 缴费金额
                sb_1.Append(MiscAction.Mapper_operator(reader["RC100"].ToString()) + "\t");                     //经办人


                short i_order = Convert.ToSByte(SqlAssist.ExecuteScalar("select count(*) from v_rc04 where rc001 ='" + s_rc001 + "' and rc010 < '" + settleId + "'"));
                try
                {
                    int commandNum = GenNewCommandNum();
                    SendPrtCommand(Envior.prtConnId,
                                   whandle,
                                   commandNum,
                                   "Register_Payrecord",
                                   sb_1.ToString(),
                                   (i_order + 1).ToString()
                                   );
                }
                catch (Exception ee)
                {
                    XtraMessageBox.Show(ee.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                XtraMessageBox.Show("未找到数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            reader.Dispose();
            oc_command.Dispose();
        }
コード例 #4
0
ファイル: AppAction.cs プロジェクト: radtek/Brown
        /// <summary>
        /// 权限检查
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public static bool CheckRight(string command)
        {
            if (Envior.cur_userId == AppInfo.ROOTID)
            {
                return(true);
            }
            string sql       = string.Format("select ri001 from ri01 where ri003 ='{0}' ", command);
            string commandId = string.Empty;
            object o         = SqlAssist.ExecuteScalar(sql);

            if (o != null)
            {
                commandId = o.ToString();
                if (!(MiscAction.GetRight(Envior.cur_userId, commandId) == "1"))
                {
                    XtraMessageBox.Show("权限不足!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
            else
            {
                return(false);
            }
        }
コード例 #5
0
ファイル: FireAction.cs プロジェクト: radtek/Brown
        /// <summary>
        /// 根据逝者编号获取逝者姓名
        /// </summary>
        /// <param name="ac001"></param>
        /// <returns></returns>
        public static string GetGuyNameById(string ac001)
        {
            OracleParameter op_ac001 = new OracleParameter(":ac001", OracleDbType.Varchar2, 10);

            op_ac001.Direction = ParameterDirection.Input;
            op_ac001.Value     = ac001;
            return(SqlAssist.ExecuteScalar("select ac003 from ac01 where ac001 =:ac001", new OracleParameter[] { op_ac001 }).ToString());
        }
コード例 #6
0
ファイル: PrtServAction.cs プロジェクト: radtek/JEast
        /// <summary>
        /// 根据结算流水号获取 税务发票 号码
        /// </summary>
        /// <param name="fa001"></param>
        /// <returns></returns>
        public static string GetTaxNum(string fa001)
        {
            OracleParameter op_fa001 = new OracleParameter("ic_ac001", OracleDbType.Varchar2, 10);

            op_fa001.Direction = ParameterDirection.Input;
            op_fa001.Value     = fa001;
            return(SqlAssist.ExecuteScalar("select pkg_business.fun_GetTaxNum(:ic_fa001) from dual", new OracleParameter[] { op_fa001 }).ToString());
        }
コード例 #7
0
        /// <summary>
        /// 产生墓位证书编号
        /// </summary>
        /// <param name="isOrig"></param>
        /// <returns></returns>
        public static string GetCertNum(string isOrig)
        {
            OracleParameter op_isOrig = new OracleParameter("ic_isOrig", OracleDbType.Varchar2, 3);

            op_isOrig.Direction = ParameterDirection.Input;
            op_isOrig.Value     = isOrig;

            return(SqlAssist.ExecuteScalar("select pkg_business.fun_getCertNum(:isOrig) from dual", new OracleParameter[] { op_isOrig }).ToString());
        }
コード例 #8
0
        public static int IsDebt(string ac001)
        {
            OracleParameter op_ac001 = new OracleParameter("ic_ac001", OracleDbType.Varchar2, 10);

            op_ac001.Direction = ParameterDirection.Input;
            op_ac001.Value     = ac001;

            return(Convert.ToInt32(SqlAssist.ExecuteScalar("select pkg_business.fun_isDebt(:ic_ac001) from dual", new OracleParameter[] { op_ac001 }).ToString()));
        }
コード例 #9
0
        /// <summary>
        /// 获取墓区预定墓位数
        /// </summary>
        /// <param name="rg001"></param>
        /// <returns></returns>
        public static int TombBookin_stat(string rg001)
        {
            OracleParameter op_rg001 = new OracleParameter("ic_rg001", OracleDbType.Varchar2, 10);

            op_rg001.Direction = ParameterDirection.Input;
            op_rg001.Value     = rg001;

            return(Convert.ToInt32(SqlAssist.ExecuteScalar("select pkg_report.fun_TombBookin_stat(:isOrig) from dual", new OracleParameter[] { op_rg001 })));
        }
コード例 #10
0
        /// <summary>
        /// 退费操作
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bBi_refund_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int rowHandle;

            string s_billType = string.Empty;
            string s_fa001    = string.Empty;

            if (tabPane1.SelectedPageIndex == 0)
            {
                return;
            }
            else if (tabPane1.SelectedPageIndex == 1)
            {
                rowHandle  = gridView3.FocusedRowHandle;
                s_billType = gridView3.GetRowCellValue(rowHandle, "BILLTYPE").ToString();
                s_fa001    = gridView3.GetRowCellValue(rowHandle, "FA001").ToString();
                string s_fa002 = SqlAssist.ExecuteScalar("select fa002 from fa01 where fa001='" + s_fa001 + "'").ToString();

                //检查与开票所在工作站是否一致!!!
                if (MiscAction.CheckWorkStationCompare(s_fa001, Envior.WORKSTATIONID, s_billType) == "0")
                {
                    XtraMessageBox.Show("此笔收费发票不是在当前工作站开具,不能继续!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }


                //if(s_fa002 == "2")
                //{
                //	XtraMessageBox.Show("此收费记录不能退费!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                //	return;
                //}
                if (MiscAction.HaveRefund(s_fa001))
                {
                    XtraMessageBox.Show("此收费记录已经有退费记录,不能再次退费!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
            }

            BaseDialog frm_1 = null;

            if (s_billType == "F")
            {
                frm_1 = new Frm_refund_select();
            }
            else
            {
                frm_1 = new Frm_refund_select2();
            }

            frm_1.swapdata["SA010"] = s_fa001;                  //结算流水号
            frm_1.swapdata["SA020"] = s_billType;               //票别
            if (frm_1.ShowDialog() == DialogResult.OK)
            {
                this.RefreshData();
            }
            frm_1.Dispose();
        }
コード例 #11
0
ファイル: MiscAction.cs プロジェクト: radtek/Brown
        /// <summary>
        /// 返回商品税率
        /// </summary>
        /// <param name="itemId"></param>
        /// <returns></returns>
        public static decimal GetItemTaxRate(string itemId)
        {
            OracleParameter op_itemId = new OracleParameter("ic_itemId", OracleDbType.Varchar2, 10);

            op_itemId.Direction = ParameterDirection.Input;
            op_itemId.Value     = itemId;

            return(decimal.Parse(SqlAssist.ExecuteScalar("select pkg_business.fun_getItemTaxRate(:itemId) from dual", new OracleParameter[] { op_itemId }).ToString()));
        }
コード例 #12
0
ファイル: FireAction.cs プロジェクト: radtek/Brown
        /// <summary>
        /// 返回火化时间
        /// </summary>
        /// <param name="ac001"></param>
        /// <returns></returns>
        public static Object GetHHTime(string ac001)
        {
            OracleParameter op_ac001 = new OracleParameter("ic_ac001", OracleDbType.Varchar2, 10);

            op_ac001.Direction = ParameterDirection.Input;
            op_ac001.Value     = ac001;
            Object re = SqlAssist.ExecuteScalar("select ac015 from ac01 where ac001 = :ac001", new OracleParameter[] { op_ac001 });

            return(re);
        }
コード例 #13
0
ファイル: MiscAction.cs プロジェクト: radtek/Brown
        /// <summary>
        /// 操作员姓名映射
        /// </summary>
        /// <param name="uc001"></param>
        /// <returns></returns>
        public static string Mapper_operator(string uc001)
        {
            OracleParameter op_uc001 = new OracleParameter("uc001", OracleDbType.Varchar2, 10);

            op_uc001.Direction = ParameterDirection.Input;
            op_uc001.Value     = uc001;
            Object re = SqlAssist.ExecuteScalar("select uc003 from uc01 where uc001 = :uc001", new OracleParameter[] { op_uc001 });

            return(re.ToString());
        }
コード例 #14
0
        /// <summary>
        /// 返回寄存结构占用号位数
        /// </summary>
        /// <param name="rg001"></param>
        /// <returns></returns>
        public static int GetRgUsedBits(string rg001)
        {
            OracleParameter op_rg001 = new OracleParameter("ic_rg001", OracleDbType.Varchar2, 10);

            op_rg001.Direction = ParameterDirection.Input;
            op_rg001.Value     = rg001;

            Object re = SqlAssist.ExecuteScalar("select pkg_Report.fun_GetRgUsedBits(:ic_rg001) from dual", new OracleParameter[] { op_rg001 });

            return(Convert.ToInt32(re));
        }
コード例 #15
0
ファイル: MiscAction.cs プロジェクト: radtek/Brown
        /// <summary>
        /// 判断指定收费记录 是否有退费记录
        /// </summary>
        /// <param name="itemId"></param>
        /// <returns></returns>
        public static bool HaveRefund(string fa001)
        {
            OracleParameter op_fa001 = new OracleParameter("ic_fa001", OracleDbType.Varchar2, 10);

            op_fa001.Direction = ParameterDirection.Input;
            op_fa001.Value     = fa001;

            int result = int.Parse(SqlAssist.ExecuteScalar("select pkg_business.fun_HaveRefund(:ic_fa001) from dual", new OracleParameter[] { op_fa001 }).ToString());

            return(result > 0 ? true:false);
        }
コード例 #16
0
        /// <summary>
        /// 返回寄存号位定价
        /// </summary>
        /// <param name="bitId"></param>
        /// <returns></returns>
        public static decimal GetBitPrice(string bitId)
        {
            OracleParameter op_bitId = new OracleParameter("ic_bitId", OracleDbType.Varchar2, 10);

            op_bitId.Direction = ParameterDirection.Input;
            op_bitId.Value     = bitId;

            Object re = SqlAssist.ExecuteScalar("select pkg_business.fun_getBitPrice(:ic_bitId) from dual", new OracleParameter[] { op_bitId });

            return(decimal.Parse(re.ToString()));
        }
コード例 #17
0
ファイル: PrtServAction.cs プロジェクト: radtek/JEast
 /// <summary>
 /// 判断是否开具发票
 /// </summary>
 /// <param name="fa001"></param>
 /// <returns></returns>
 public static bool IsInvoiced(string fa001)
 {
     if (string.IsNullOrEmpty(SqlAssist.ExecuteScalar("select fa005 from fa01 where fa001 ='" + fa001 + "'").ToString()))
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
コード例 #18
0
        /// <summary>
        /// 返回最后一次 寄存缴费单价
        /// </summary>
        /// <param name="rc001"></param>
        /// <returns></returns>
        public static decimal GetLastRegPrice(string rc001)
        {
            OracleParameter op_rc001 = new OracleParameter("ic_rc001", OracleDbType.Varchar2, 10);

            op_rc001.Direction = ParameterDirection.Input;
            op_rc001.Value     = rc001;

            Object re = SqlAssist.ExecuteScalar("select pkg_business.fun_getLastRegPrice(:ic_rc001) from dual", new OracleParameter[] { op_rc001 });

            return(Convert.ToDecimal(re));
        }
コード例 #19
0
        private void Frm_invoiceLog_Load(object sender, EventArgs e)
        {
            s_fa001       = this.swapdata["fa001"].ToString();
            te_fa001.Text = s_fa001;

            using (OracleDataReader reader = SqlAssist.ExecuteReader("select * from fa01 where fa001='" + s_fa001 + "'"))
            {
                if (reader.Read())
                {
                    s_fa190       = reader["FA190"].ToString();
                    s_fa195       = reader["FA195"].ToString();
                    te_fa003.Text = reader["FA003"].ToString();

                    //计算财政票据金额
                    te_fin.Text = SqlAssist.ExecuteScalar("select nvl(sum(sa007),0) from v_sa01 where sa020 ='F' and sa010 ='" + s_fa001 + "'").ToString();
                    //计算税务票据金额
                    te_tax.Text = SqlAssist.ExecuteScalar("select nvl(sum(sa007),0) from v_sa01 where sa020 ='T' and sa010 ='" + s_fa001 + "'").ToString();

                    if (!s_fa190.Equals(s_fa195))  //应开、已开不相等
                    {
                        if (s_fa195.Substring(0, 1) == s_fa190.Substring(0, 1))
                        {
                            xtraTabPage1.PageEnabled = false;
                        }
                        else
                        {
                            //te_pjlx.Text = Envior.FIN_INVOICE_TYPE;  //财政票据类型
                            //te_zch.Text = GetZch();
                        }

                        if (s_fa195.Substring(1, 1) == s_fa190.Substring(1, 1))
                        {
                            xtraTabPage2.PageEnabled = false;
                        }
                        else
                        {
                            te_tax_code.Text = GetFPDM();
                        }

                        if (!xtraTabPage1.PageEnabled && xtraTabPage2.PageEnabled)
                        {
                            xtraTabControl1.SelectedTabPage = xtraTabPage2;
                        }
                    }
                    else
                    {
                        xtraTabPage1.PageEnabled = false;
                        xtraTabPage2.PageEnabled = false;
                        b_ok.Enabled             = false;
                    }
                }
            }
        }
コード例 #20
0
        private void Frm_RegisterPay_Load(object sender, EventArgs e)
        {
            string s_rc130 = string.Empty;

            rc001 = this.swapdata["RC001"].ToString();

            OracleDataReader reader = SqlAssist.ExecuteReader("select * from rc01 where rc001='" + rc001 + "'");

            while (reader.Read())
            {
                txtEdit_rc001.Text      = rc001;
                txtEdit_rc109.EditValue = reader["RC109"];
                txtEdit_rc003.EditValue = reader["RC003"];
                txtEdit_rc303.EditValue = reader["RC303"];
                txtEdit_rc004.EditValue = reader["RC004"];
                txtEdit_rc404.EditValue = reader["RC404"];
                rg_rc002.EditValue      = reader["RC002"];
                rg_rc202.EditValue      = reader["RC202"];
                be_position.Text        = RegisterAction.GetRegPathName(rc001);

                s_rc130  = reader["RC130"].ToString();
                bitprice = Convert.ToDecimal(SqlAssist.ExecuteScalar("select bi009 from bi01 where bi001='" + s_rc130 + "'", null));
                txtedit_price.EditValue = bitprice;

                //如果最后缴费日期 大于 2018-01-01 则无需混合价格
                if (string.Compare(Convert.ToDateTime(reader["RC150"]).ToString("yyyyMMdd"), "20180101") > 0)
                {
                    checkEdit1.Enabled = false;
                }
                else
                {
                    oldprice = RegisterAction.GetLastRegPrice(rc001);
                }
            }
            reader.Dispose();

            rc04Adapter.SelectCommand.CommandText = "select * from v_rc04 where rc001='" + rc001 + "' order by rc020";
            rc04Adapter.Fill(dt_rc04);
            gridControl1.DataSource = dt_rc04;

            fpAdapter.Fill(dt_fpsource);
            lookup_sa004.DataSource    = dt_fpsource;
            lookup_sa004.DisplayMember = "ITEM_TEXT";
            lookup_sa004.ValueMember   = "ITEM_ID";

            sa01Adapter.Fill(dt_sa01);
            gridControl2.DataSource = dt_sa01;

            //comboBox1.Text = "";
            this.Calc_Hj(12);
        }
コード例 #21
0
ファイル: MiscAction.cs プロジェクト: radtek/Brown
        /// <summary>
        /// 判断 当前工作站是否允许 操作结算记录 1-允许操作 0-不允许
        /// </summary>
        /// <param name="fa001"></param>
        /// <param name="ws001"></param>
        /// <returns></returns>
        public static string CheckWorkStationCompare(string fa001, string ws001)
        {
            OracleParameter op_fa001 = new OracleParameter("ic_fa001", OracleDbType.Varchar2, 10);

            op_fa001.Direction = ParameterDirection.Input;
            op_fa001.Value     = fa001;

            OracleParameter op_ws001 = new OracleParameter("ic_ws001", OracleDbType.Varchar2, 10);

            op_ws001.Direction = ParameterDirection.Input;
            op_ws001.Value     = ws001;

            return(SqlAssist.ExecuteScalar("select pkg_business.fun_CheckWorkStationCompare(:ic_fa001,:ic_ws001) from dual", new OracleParameter[] { op_fa001, op_ws001 }).ToString());
        }
コード例 #22
0
        /// <summary>
        /// 获取税务发票代码
        /// </summary>
        /// <returns></returns>
        private string GetFPDM()
        {
            OracleParameter op_ws001 = new OracleParameter("ws001", OracleDbType.Varchar2, 10);

            op_ws001.Value = Envior.WORKSTATIONID;
            object value = SqlAssist.ExecuteScalar("select INVOICECODE from tax_log where ws001 = :ws001 and to_char(INVOICEDATE,'yyyy-mm-dd') >= to_char(sysdate - 3,'yyyy-mm-dd') and rownum < 2", new OracleParameter[] { op_ws001 });

            if (value == null || value is DBNull)
            {
                return("");
            }
            else
            {
                return(value.ToString());
            }
        }
コード例 #23
0
ファイル: MiscAction.cs プロジェクト: radtek/Brown
        /// <summary>
        /// 获取项目的 发票编码 (含财政、税务)
        /// </summary>
        /// <param name="serviceSalesType"></param>
        /// <param name="itemId"></param>
        /// <returns></returns>
        public static string GetItemInvoiceCode(string serviceSalesType, string itemId)
        {
            //项目类别
            OracleParameter op_type = new OracleParameter("ic_serviceSalesType", OracleDbType.Varchar2, 3);

            op_type.Direction = ParameterDirection.Input;
            op_type.Value     = serviceSalesType;

            //项目ID
            OracleParameter op_itemId = new OracleParameter("ic_salesItemId", OracleDbType.Varchar2, 10);

            op_itemId.Direction = ParameterDirection.Input;
            op_itemId.Value     = itemId;

            return(SqlAssist.ExecuteScalar("select pkg_business.fun_GetInvoiceCode(:type,:itemId) from dual", new OracleParameter[] { op_type, op_itemId }).ToString());
        }
コード例 #24
0
        //获取层定价
        public static decimal GetLayerPrice(string regionId, int layer)
        {
            OracleParameter op_regionId = new OracleParameter("ic_regionId", OracleDbType.Varchar2, 10);

            op_regionId.Direction = ParameterDirection.Input;
            op_regionId.Value     = regionId;

            OracleParameter op_layerNum = new OracleParameter("ic_layerNum", OracleDbType.Int32);

            op_layerNum.Direction = ParameterDirection.Input;
            op_layerNum.Value     = layer;

            Object re = SqlAssist.ExecuteScalar("select pkg_business.fun_getLayerPrice(:ic_regionId,:ic_layerNum) from dual", new OracleParameter[] { op_regionId, op_layerNum });

            return((decimal)re);
        }
コード例 #25
0
        /// <summary>
        /// 根据寄存排 和 号位描述 返回号位编号
        /// </summary>
        /// <param name="regionId"></param>
        /// <param name="bitDesc"></param>
        /// <returns></returns>
        public static string GetBitId(string regionId, string bitDesc)
        {
            OracleParameter op_regionId = new OracleParameter("ic_regionId", OracleDbType.Varchar2, 10);

            op_regionId.Direction = ParameterDirection.Input;
            op_regionId.Value     = regionId;

            OracleParameter op_bitDesc = new OracleParameter("ic_bitdesc", OracleDbType.Varchar2, 50);

            op_bitDesc.Direction = ParameterDirection.Input;
            op_bitDesc.Value     = bitDesc;

            Object re = SqlAssist.ExecuteScalar("select pkg_business.fun_getBitId(:ic_regionId,:ic_bitdesc) from dual", new OracleParameter[] { op_regionId, op_bitDesc });

            return(re.ToString());
        }
コード例 #26
0
        /// <summary>
        /// 财政退费操作中 原发票是否在新接口上线前
        /// </summary>
        /// <param name="fa001"></param>
        /// <returns></returns>
        public static bool FinRefundBeforeOnline(string fa001)
        {
            OracleParameter op_fa001 = new OracleParameter("ic_fa001", OracleDbType.Varchar2, 10);

            op_fa001.Direction = ParameterDirection.Input;
            op_fa001.Value     = fa001;

            int i_result = Convert.ToInt32(SqlAssist.ExecuteScalar("select pkg_business.fun_FinRefundBeforeOnline(:ic_fa001) from dual", new OracleParameter[] { op_fa001 }));

            if (i_result == 1)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #27
0
        /// <summary>
        /// 补开税务退费发票
        /// </summary>
        /// <param name="fa001"></param>
        private void ReInvoiceTaxRefund(string fa001)
        {
            string s_cuname = SqlAssist.ExecuteScalar("select fa003 from fa01 where fa001='" + fa001 + "'").ToString();
            //获取税务客户信息
            Frm_TaxClientInfo frm_taxClient = new Frm_TaxClientInfo(s_cuname);

            if (frm_taxClient.ShowDialog() == DialogResult.OK)
            {
                TaxClientInfo clientInfo = frm_taxClient.swapdata["taxclientinfo"] as TaxClientInfo;
                if (TaxInvoice.GetNextInvoiceNo() > 0)
                {
                    if (XtraMessageBox.Show("下一张税票代码:" + Envior.NEXT_BILL_CODE + "\r\n" + "票号:" + Envior.NEXT_BILL_NUM + ",是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        TaxInvoice.Invoice(fa001, clientInfo);
                    }
                }
            }
        }
コード例 #28
0
        public static bool isIncludeLamp(string fa001)
        {
            OracleParameter op_fa001 = new OracleParameter("ic_fa001", OracleDbType.Varchar2, 10);

            op_fa001.Direction = ParameterDirection.Input;
            op_fa001.Value     = fa001;

            Object re = SqlAssist.ExecuteScalar("select pkg_business.fun_IncludeLamp(:ic_fa001) from dual", new OracleParameter[] { op_fa001 });

            if (Convert.ToInt32(re) > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #29
0
        private void b_ok_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textEdit1.Text))
            {
                textEdit1.ErrorImageOptions.Alignment = ErrorIconAlignment.MiddleRight;
                textEdit1.ErrorText = "请输入原密码!";
                return;
            }
            if (string.IsNullOrEmpty(textEdit2.Text))
            {
                textEdit2.ErrorImageOptions.Alignment = ErrorIconAlignment.MiddleRight;
                textEdit2.ErrorText = "请输入新密码!";
                return;
            }
            if (string.IsNullOrEmpty(textEdit3.Text) || textEdit2.Text != textEdit3.Text)
            {
                textEdit3.ErrorImageOptions.Alignment = ErrorIconAlignment.MiddleRight;
                textEdit3.ErrorText = "密码不一致!";
                return;
            }

            string s_orig_pwd = string.Empty;

            OracleParameter op_uc001 = new OracleParameter("uc001", OracleDbType.Varchar2, 10);

            op_uc001.Value = Envior.cur_userId;

            s_orig_pwd = SqlAssist.ExecuteScalar("select uc004 from uc01 where uc001 = :uc001", op_uc001).ToString();
            if (Tools.EncryptWithMD5(textEdit1.Text) != s_orig_pwd)
            {
                textEdit1.ErrorImageOptions.Alignment = ErrorIconAlignment.MiddleRight;
                textEdit1.ErrorText = "原密码不正确!";
                return;
            }

            string s_new_pwd = Tools.EncryptWithMD5(textEdit2.Text);

            if (MiscAction.Modify_Pwd(Envior.cur_userId, s_new_pwd) == 1)
            {
                MessageBox.Show("修改密码成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
        }
コード例 #30
0
ファイル: RibbonForm.cs プロジェクト: radtek/JEast
        /// <summary>
        /// 连接打印服务
        /// </summary>
        private void ConnectPrtServ()
        {
            IntPtr hwnd = FindWindow(null, "prtserv");

            if (hwnd != IntPtr.Zero)
            {
                Envior.prtservHandle = hwnd;
                int prtConnId = int.Parse(SqlAssist.ExecuteScalar("select seq_prtserv.nextval from dual", null).ToString());

                ////建立连接
                PrtServAction.Connect(prtConnId, hwnd.ToInt32(), this.Handle.ToInt32());
                Envior.prtConnId = prtConnId;

                ////给打印服务窗口发消息 建立连接
                SendMessage(hwnd, 0x2710, 0, prtConnId);
            }
            else
            {
                MessageBox.Show("没有找到打印服务进程,不能打印!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
        }