예제 #1
0
 public RecordList(FormTypes formtype, int iBudgetRecordType, int iYear, int iMonthStart, int iMonthEnd, V_ExecutionList entRev)
 {
     CheckConverter();
     InitializeComponent();
     FormType         = formtype;
     BudgetRecordType = iBudgetRecordType;
     BudgetYear       = iYear;
     BudgetMonthStart = iMonthStart;
     BudgetMonthEnd   = iMonthEnd;
     entExecution     = entRev;
     InitPage();
 }
예제 #2
0
 public RecordList(FormTypes formtype, int iBudgetRecordType, int iYear, int iMonthStart, int iMonthEnd, V_ExecutionList entRev)
 {
     CheckConverter();
     InitializeComponent();
     FormType = formtype;
     BudgetRecordType = iBudgetRecordType;
     BudgetYear = iYear;
     BudgetMonthStart = iMonthStart;
     BudgetMonthEnd = iMonthEnd;
     entExecution = entRev;
     InitPage();
 }
예제 #3
0
        /// <summary>
        /// 显示公司及部门选中链接指向的明细记录
        /// </summary>
        /// <param name="iBudgetRecordType"></param>
        private void ShowRecordDetails(int iBudgetRecordType)
        {
            if (iBudgetRecordType == 0)
            {
                Utility.ShowCustomMessage(MessageTypes.Message, "台帐查询", "当前选中项无单据");
                return;
            }

            string strSignInID = string.Empty;

            if (dgQueryResult.SelectedItems == null)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "VIEW"));
                return;
            }

            if (dgQueryResult.SelectedItems.Count == 0)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "VIEW"));
                return;
            }

            int iYear = 0, iMonthStart = 0, iMonthEnd = 0;

            int.TryParse(nudYear.Value.ToString(), out iYear);
            int.TryParse(nudMonthStart.Value.ToString(), out iMonthStart);
            int.TryParse(nudMonthEnd.Value.ToString(), out iMonthEnd);

            if (iMonthStart > iMonthEnd)
            {
                return;
            }

            V_ExecutionList ent = dgQueryResult.SelectedItems[0] as V_ExecutionList;

            decimal dMoney = 0;
            string  strTitle = string.Empty, strMsg = string.Empty;

            switch (iBudgetRecordType)
            {
            case 1:
                dMoney   = ent.BudgetMoneyYear;
                strTitle = "年度预算总览";
                break;

            case 2:
                dMoney   = ent.BudgetMoneyMonth;
                strTitle = "月度预算总览";
                break;

            case 3:
                dMoney   = ent.ApprovedApplyMoney;
                strTitle = "已审核报销费用总览";
                break;

            case 4:
                dMoney   = ent.ApprovingApplyMoney;
                strTitle = "审核中报销费用总览";
                break;

            case -1:
                iBudgetRecordType = 3;
                dMoney            = ent.JanApprovedMoney;
                iMonthStart       = 1;
                iMonthEnd         = 1;
                strTitle          = "一月已审核报销费用总览";
                break;

            case -2:
                iBudgetRecordType = 3;
                dMoney            = ent.FebApprovedMoney;
                iMonthStart       = 2;
                iMonthEnd         = 2;
                strTitle          = "二月已审核报销费用总览";
                break;

            case -3:
                iBudgetRecordType = 3;
                dMoney            = ent.MarApprovedMoney;
                iMonthStart       = 3;
                iMonthEnd         = 3;
                strTitle          = "三月已审核报销费用总览";
                break;

            case -4:
                iBudgetRecordType = 3;
                dMoney            = ent.AprApprovedMoney;
                iMonthStart       = 4;
                iMonthEnd         = 4;
                strTitle          = "四月已审核报销费用总览";
                break;

            case -5:
                iBudgetRecordType = 3;
                dMoney            = ent.MayApprovedMoney;
                iMonthStart       = 5;
                iMonthEnd         = 5;
                strTitle          = "五月已审核报销费用总览";
                break;

            case -6:
                iBudgetRecordType = 3;
                dMoney            = ent.JunApprovedMoney;
                iMonthStart       = 6;
                iMonthEnd         = 6;
                strTitle          = "六月已审核报销费用总览";
                break;

            case -7:
                iBudgetRecordType = 3;
                dMoney            = ent.JulApprovedMoney;
                iMonthStart       = 7;
                iMonthEnd         = 7;
                strTitle          = "七月已审核报销费用总览";
                break;

            case -8:
                iBudgetRecordType = 3;
                dMoney            = ent.AugApprovedMoney;
                iMonthStart       = 8;
                iMonthEnd         = 8;
                strTitle          = "八月已审核报销费用总览";
                break;

            case -9:
                iBudgetRecordType = 3;
                dMoney            = ent.SepApprovedMoney;
                iMonthStart       = 9;
                iMonthEnd         = 9;
                strTitle          = "九月已审核报销费用总览";
                break;

            case -10:
                iBudgetRecordType = 3;
                dMoney            = ent.OctApprovedMoney;
                iMonthStart       = 10;
                iMonthEnd         = 10;
                strTitle          = "十月已审核报销费用总览";
                break;

            case -11:
                iBudgetRecordType = 3;
                dMoney            = ent.NovApprovedMoney;
                iMonthStart       = 11;
                iMonthEnd         = 11;
                strTitle          = "十一月已审核报销费用总览";
                break;

            case -12:
                iBudgetRecordType = 3;
                dMoney            = ent.DecApprovedMoney;
                iMonthStart       = 12;
                iMonthEnd         = 12;
                strTitle          = "十二月已审核报销费用总览";
                break;
            }

            if (dMoney == 0)
            {
                Utility.ShowCustomMessage(MessageTypes.Message, strTitle, "当前选中项无单据");
                return;
            }

            if (ent.SubjectName == "活动经费" && iBudgetRecordType == 2)
            {
                Utility.ShowCustomMessage(MessageTypes.Message, strTitle, "当前选中项禁止查看详单");
                return;
            }

            RecordList viewRd = new RecordList(FormTypes.Browse, iBudgetRecordType, iYear, iMonthStart, iMonthEnd, ent);

            EntityBrowser entBrowser = new EntityBrowser(viewRd);

            entBrowser.FormType         = FormTypes.Browse;
            entBrowser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
            entBrowser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
        }