Exemplo n.º 1
0
        private void B_ok_Click(object sender, EventArgs e)
        {
            decimal nums;

            if (!decimal.TryParse(comboBox1.Text, out nums))
            {
                MessageBox.Show("请输入正确的缴费年限!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            if (!(bitprice > 0))
            {
                MessageBox.Show("参数传递错误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            string fa001 = Tools.GetEntityPK("FA01");
            int    re    = RegisterAction.RegisterPay(rc001, fa001, bitprice, nums, Envior.cur_userId);

            if (re > 0)
            {
                dt_rc04.Rows.Clear();
                rc04Adapter.Fill(dt_rc04);

                if (MessageBox.Show("缴费成功!现在打印【发票】吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    if (!Envior.canInvoice)
                    {
                        MessageBox.Show("当前用户没有打印发票权限!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                    if (!Envior.TAX_READY)
                    {
                        MessageBox.Show("金税卡没有打开!", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                    else
                    {
                        Frm_taxClientInfo frm_client = new Frm_taxClientInfo();
                        frm_client.swapdata["parent"] = this;
                        frm_client.swapdata["title"]  = FireAction.Get_PassbyName(rc001);
                        if (frm_client.ShowDialog(this) == DialogResult.OK)
                        {
                            InvoiceInfo invClient = this.swapdata["clientinfo"] as InvoiceInfo;

                            //打印发票
                            //PrtServAction.Print_RegisterInvoice(fa001, invClient, this.Handle.ToInt32());
                            PrtServAction.Print_Invoice(fa001, invClient);
                        }
                        frm_client.Dispose();
                    }
                }

                if (MessageBox.Show("现在打印缴费记录吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    //打印缴费记录
                    PrtServAction.PrtRegisterPayRecord(fa001, this.Handle.ToInt32());
                }
                DialogResult = DialogResult.OK;
                this.Close();
            }
        }
Exemplo n.º 2
0
        private void B_ok_Click(object sender, EventArgs e)
        {
            string        settleId   = Tools.GetEntityPK("FA01");
            List <string> sa001_list = new List <string>();

            foreach (DataRow r in dt_source.Rows)
            {
                sa001_list.Add(r["SA001"].ToString());
            }

            int result = FireAction.FireBusinessSettle(settleId,
                                                       AC001,
                                                       sa001_list.ToArray(),
                                                       Envior.cur_userId
                                                       );

            if (result > 0)
            {
                b_ok.Enabled = false;

                MessageBox.Show("结算办理成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

                int fire_row = gridView1.LocateByValue("SA002", "06");
                //如果有火化,打印火化证明
                if (fire_row >= 0)
                {                   //打印火化证明
                    if (MessageBox.Show("现在打印火化证明!", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                    {
                        PrtServAction.Print_HHZM(AC001, this.Handle.ToInt32());
                    }
                }

                if (MessageBox.Show("现在打印【发票】吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    if (!Envior.canInvoice)
                    {
                        MessageBox.Show("当前用户没有打印发票权限!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                    else if (!Envior.TAX_READY)
                    {
                        MessageBox.Show("金税卡没有打开!", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                    else
                    {
                        Frm_taxClientInfo frm_client = new Frm_taxClientInfo();
                        frm_client.swapdata["parent"] = this;
                        frm_client.swapdata["title"]  = FireAction.Get_PassbyName(AC001);
                        if (frm_client.ShowDialog(this) == DialogResult.OK)
                        {
                            InvoiceInfo invClient = this.swapdata["clientinfo"] as InvoiceInfo;

                            //打印发票
                            //PrtServAction.Print_Fireinvoice(settleId, invClient, this.Handle.ToInt32() );
                            PrtServAction.Print_Invoice(settleId, invClient);
                        }
                        frm_client.Dispose();
                    }
                }

                //打印付货单
                int jp_row = gridView1.LocateByValue("SA002", "12");                  //
                //如果有祭品 则打印付货单
                if (jp_row >= 0)
                {
                    if (MessageBox.Show("现在打印【付货单】吗?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        PrtServAction.Print_FHD(settleId, this.Handle.ToInt32());
                    }
                }

                DialogResult = DialogResult.OK;
                this.Dispose();
            }
        }
Exemplo n.º 3
0
        private void B_ok_Click(object sender, EventArgs e)
        {
            if (!gridView1.PostEditor())
            {
                return;
            }
            if (!gridView1.UpdateCurrentRow())
            {
                return;
            }
            if (!SaveCheck())
            {
                return;                            //数据合法性校验!!!
            }
            if (source == "1")
            {
                ac001 = Tools.GetEntityPK("RC01");                         //逝者编号
            }
            string s_fa001 = Tools.GetEntityPK("FA01");                    //结算流水号
            string s_rc109 = RegisterAction.GenRegisterNo("0");            //正常登记寄存证号
            string s_rc002 = rg_rc002.EditValue.ToString();                //性别
            string s_rc202 = rg_rc202.EditValue.ToString();                //性别2
            string s_rc003 = txtEdit_rc003.Text;                           //逝者姓名
            string s_rc303 = txtEdit_rc303.Text;                           //逝者姓名2
            int    rc004   = int.Parse(txtEdit_rc004.Text);                //年龄
            int    rc404;

            if (!string.IsNullOrEmpty(txtEdit_rc404.Text))
            {
                rc404 = int.Parse(txtEdit_rc404.Text);
            }
            else
            {
                rc404 = 0;
            }

            string   s_rc014 = txtedit_rc014.Text;                            //身份证号
            string   s_rc050 = txtEdit_rc050.Text;                            //联系人
            string   s_rc051 = txtEdit_rc051.Text;                            //联系电话
            string   s_rc052 = lookUp_rc052.EditValue.ToString();             //与逝者关系
            string   s_rc055 = txtEdit_ac055.Text;                            //联系地址
            string   s_rc099 = mem_rc099.Text;                                //备注
            DateTime d_rc140 = DateTime.Now;                                  //寄存日期
            decimal  nums    = decimal.Parse(comboBox1.Text);                 //缴费年限



            List <string>  itemId_List    = new List <string>();
            List <decimal> itemPrice_List = new List <decimal>();
            List <int>     itemNums_List  = new List <int>();

            int re = 0;

            if (fpfee > 0)
            {
                foreach (DataRow r in register_ds.Sa01.Rows)
                {
                    itemId_List.Add(r["SA004"].ToString());
                    itemPrice_List.Add(Convert.ToDecimal(r["PRICE"]));
                    itemNums_List.Add(Convert.ToInt32(r["NUMS"]));
                }
                re = RegisterAction.RegisterEnroll(ac001,
                                                   s_rc109,
                                                   s_fa001,
                                                   s_rc002,
                                                   s_rc202,
                                                   s_rc003,
                                                   s_rc303,
                                                   rc004,
                                                   rc404,
                                                   s_rc014,
                                                   s_rc050,
                                                   s_rc051,
                                                   s_rc052,
                                                   s_rc055,
                                                   s_rc099,
                                                   bitId,
                                                   bitPrice,
                                                   d_rc140,
                                                   d_rc140,
                                                   nums,
                                                   source,
                                                   itemId_List.ToArray(),
                                                   itemPrice_List.ToArray(),
                                                   itemNums_List.ToArray(),
                                                   Envior.cur_userId
                                                   );
            }
            else
            {
                re = RegisterAction.RegisterEnroll(ac001,
                                                   s_rc109,
                                                   s_fa001,
                                                   s_rc002,
                                                   s_rc202,
                                                   s_rc003,
                                                   s_rc303,
                                                   rc004,
                                                   rc404,
                                                   s_rc014,
                                                   s_rc050,
                                                   s_rc051,
                                                   s_rc052,
                                                   s_rc055,
                                                   s_rc099,
                                                   bitId,
                                                   bitPrice,
                                                   d_rc140,
                                                   d_rc140,
                                                   nums,
                                                   source,
                                                   Envior.cur_userId
                                                   );
            }

            if (re > 0)
            {
                txtEdit_rc001.EditValue = ac001;
                txtEdit_rc109.EditValue = s_rc109;
                if (MessageBox.Show("现在打印【发票】吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    if (!Envior.canInvoice)
                    {
                        MessageBox.Show("当前用户没有打印发票权限!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                    if (!Envior.TAX_READY)
                    {
                        MessageBox.Show("金税卡没有打开!", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                    else
                    {
                        Frm_taxClientInfo frm_client = new Frm_taxClientInfo();
                        frm_client.swapdata["parent"] = this;
                        frm_client.swapdata["title"]  = FireAction.Get_PassbyName(ac001);
                        if (frm_client.ShowDialog(this) == DialogResult.OK)
                        {
                            InvoiceInfo invClient = this.swapdata["clientinfo"] as InvoiceInfo;

                            //打印发票
                            //PrtServAction.Print_RegisterInvoice(s_fa001, invClient, this.Handle.ToInt32());
                            PrtServAction.Print_Invoice(s_fa001, invClient);
                        }
                        frm_client.Dispose();
                    }
                }
                if (MessageBox.Show("办理成功!现在打印【骨灰寄存证】吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    PrtServAction.PrtRegisterCert(ac001, s_fa001, this.Handle.ToInt32());
                }
                if (MessageBox.Show("现在打印【寄存标签】吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    PrtServAction.PrtRegisterLabel(ac001, this.Handle.ToInt32());
                }


                DialogResult = DialogResult.OK;
                this.Dispose();
            }
        }