⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmwarrantsheng.cs

📁 财务凭证管理系统,主要是从事公司或部门的财务方面的管理。此系统给会计人员带来很大的帮助!
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using property.model.Warrant;
using property.control.warrantInfo;
using property.view.WarrantInfo.CrRepotr;
namespace property.view.WarrantInfo
{
    public partial class frmWarrantSheng : Form
    {
        public frmWarrantSheng()
        {
            InitializeComponent();
        }
        public string P_str_shePin;//局部变量
        public int G_int_sheng=3;//全局量
        private void frmWarrantSheng_Load(object sender, EventArgs e)
        {
            GetWarInfo gw = new GetWarInfo();
            gw.GetDatGridView(this.dataGridView1);

        }

        private void dataGridView1_Click(object sender, EventArgs e)
        {
            P_str_shePin = this.dataGridView1.SelectedCells[0].Value.ToString();
        }
        //审记
        private void button1_Click(object sender, EventArgs e)
        {
            GetWarInfo getwar = new GetWarInfo();
            int P_int_count = getwar.GetCount();//调用方法查找数据库中是否有要审察的记录
            if (P_int_count == 1)
            {
                if (P_str_shePin == null)//选择条件
                {
                    MessageBox.Show("请选择要审核的的记录", "凭证审核", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    GetWarInfo gw = new GetWarInfo();
                    gw.GetDatGridView(this.dataGridView1);
                    return;
                }// end block if 
                else
                {

                    String P_str_Sheng = getwar.GetShengwarr(Convert.ToInt32(P_str_shePin));//单个审批方法
               
                    if (P_str_Sheng == "updateOk")
                    {
                        MessageBox.Show("审核成功", "凭证审核", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        P_str_shePin = null;
                        G_int_sheng = 1;
                        return;
                    }// end block if 
                    if (P_str_Sheng == "updateError")
                    {
                        MessageBox.Show("审核失败\n" + "请重新输入", "凭证审核", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        P_str_shePin = null;
                        return;
                    }// end block if 
                    if (P_str_Sheng == "updateNO")
                    {
                        MessageBox.Show("操作出现异常\n" + "请重新输入", "凭证审核", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        P_str_shePin = null;
                        return;
                    }//end block if 
                }// end block else
            }// end block 
            else
            {
                MessageBox.Show("现在没有审核的记录" + "请凭证", "凭证审核", MessageBoxButtons.OK, MessageBoxIcon.Information);
                
                return;
            }//end blcok
        }

        private void bntEsce_Click(object sender, EventArgs e)
        {
            DialogResult a = MessageBox.Show("是否要退出审核?", "退出", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (Convert.ToString(a) == "Yes")
            {
                this.Close();
            }// end block 
        }
        //批量审察
        private void bntPiLiang_Click(object sender, EventArgs e)
        {   
            GetWarInfo getwar = new GetWarInfo();
            int P_int_count = getwar.GetCount();//调用方法查找数据库中是否有要审察的记录
            if (P_int_count == 1)
            {
                DialogResult a = MessageBox.Show("您确定要批量审核,请再仔细查看一下", "友情提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                if (Convert.ToString(a)=="Yes" )//选择条件
                {
                    String P_str_Sheng = getwar.GetShengwarr();//单个审批方法
                    if (P_str_Sheng == "updateOk")
                    {
                        MessageBox.Show("审核成功", "凭证审核", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        getwar.GetDatGridView(this.dataGridView1);
                        G_int_sheng = 2;
                        return;
                    }// end block if 
                    if (P_str_Sheng == "updateError")
                    {
                        MessageBox.Show("审核失败\n" + "请重新输入", "凭证审核", MessageBoxButtons.OK, MessageBoxIcon.Information);

                       return;
                    }// end block if 
                    if (P_str_Sheng == "updateNO")
                    {
                        MessageBox.Show("操作出现异常\n" + "请重新输入", "凭证审核", MessageBoxButtons.OK, MessageBoxIcon.Information);

                        return;
                    }//end block if 
                }// end block if 
            }// end block 
            else
            {
                MessageBox.Show("现在没有审核的记录" + "请凭证", "凭证审核", MessageBoxButtons.OK, MessageBoxIcon.Information);
                
                return;
            }//end blcok

        }

        private void bntPrint_Click(object sender, EventArgs e)
        {
            if( G_int_sheng ==1)
            {
                RepWarrtID frmsum = new RepWarrtID(Convert.ToInt32(P_str_shePin));
                frmsum.Show();
            }//单个批审
            if (G_int_sheng == 2)
            { }//批量审
            if (G_int_sheng==3)
            {
                MessageBox.Show("现在没有审核的记录" + "请审核", "凭证审核", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
        }

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }// end block menthod
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -