Exemple #1
0
        private void accountacc_all_Shown(object sender, EventArgs e)
        {
            accountacc_one accone = new accountacc_one();
            DataTable      dt     = accone.accountaccone("201703", "201703", "", "315", "", "", "", "", "", "", "", "", "1");

            qg_grid1.DataSource          = dt;
            qg_grid1.AutoGenerateColumns = true;
        }
Exemple #2
0
        private void qg_button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (monaaa.Text.IsNullOrEmpty())
                {
                    MessageBox.Show("请选择月份");
                    return;
                }
                string pro3 = monaaa.Text.ToString();

                string subid = "";//科目ID
                if (kmaaa.Text.NotIsNullOrEmpty())
                {
                    subid = kmaaa.SelectedValue.ToString();
                }

                string pjh1 = pjh1_text.Text.ToString().Trim();
                string pzh1 = pzh1_text.Text.ToString();

                int    pz_type   = qg_radio_group1.Tag.ToString().ToInt();//凭证类型
                string pz_typeid = "";
                switch (pz_type)
                {
                case 1:    //全部
                    pz_typeid = "";
                    break;

                case 2:    //收入凭证
                    pz_typeid = begin_class.wcodingtypepzid1;
                    break;

                case 3:    //支出凭证
                    pz_typeid = begin_class.wcodingtypepzid2;
                    break;

                case 4:    //转帐凭证
                    pz_typeid = begin_class.wcodingtypepzid3;
                    break;

                default:
                    break;
                }

                int    pz_zt   = qg_radio_group2.Tag.ToString().ToInt();//凭证状态
                string pz_ztid = "";
                switch (pz_zt)
                {
                case 1:    //全部
                    pz_ztid = "";
                    break;

                case 2:    //已制单
                    pz_ztid = "1";
                    break;

                case 3:    //已审核
                    pz_ztid = "2";
                    break;

                case 4:    //主管已审
                    pz_ztid = "5";
                    break;

                case 5:    //已记帐
                    pz_ztid = "5";
                    break;

                case 6:    //作废
                    pz_ztid = "9";
                    break;

                default:
                    break;
                }
                accountacc_one accone = new accountacc_one();
                begin_class.vouchereditdbfacc = accone.accountaccone(pro3, pro3, pz_typeid, subid, pz_ztid, pjh1, pzh1, "", "", "", "", "", "1");
                if (begin_class.vouchereditdbfacc.Rows.Count <= 0)
                {
                    MessageBox.Show("没有查找到相应的凭证!");
                }

                //string accallidtempid = begin_class.vouchereditdbfacc.Rows[0]["ID"].ToString();

                accountone acc = new accountone();
                //foreach (Control trol in acc.Controls)
                //{
                //    if (trol is a_qg_trol.aqgvoucher.containerallall)
                //    { ((a_qg_trol.aqgvoucher.containerallall)trol).accallid_new = accallidtempid; }
                //}
                acc.Owner = this;
                acc.ShowDialog();
            }
            catch (Exception ex)
            {
                ex.errormess();
            }
        }