Ejemplo n.º 1
0
 public RecordList(FormTypes formtype, int iBudgetRecordType, int iYear, int iMonthStart, int iMonthEnd, V_PerExecutionList entRev)
 {
     CheckConverter();
     InitializeComponent();
     FormType         = formtype;
     BudgetRecordType = iBudgetRecordType;
     BudgetYear       = iYear;
     BudgetMonthStart = iMonthStart;
     BudgetMonthEnd   = iMonthEnd;
     entPerExecution  = entRev;
     InitPage();
 }
Ejemplo n.º 2
0
 public RecordList(FormTypes formtype, int iBudgetRecordType, int iYear, int iMonthStart, int iMonthEnd, V_PerExecutionList entRev)
 {
     CheckConverter();
     InitializeComponent();
     FormType = formtype;
     BudgetRecordType = iBudgetRecordType;
     BudgetYear = iYear;
     BudgetMonthStart = iMonthStart;
     BudgetMonthEnd = iMonthEnd;
     entPerExecution = entRev;
     InitPage();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 显示岗位及个人选中链接指向的明细记录
        /// </summary>
        /// <param name="iBudgetRecordType"></param>
        private void ShowPerRecordDetails(int iBudgetRecordType)
        {
            if (iBudgetRecordType == 0)
            {
                Utility.ShowCustomMessage(MessageTypes.Message, "台帐查询", "当前选中项无单据");
                return;
            }

            string strSignInID = string.Empty;

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

            if (dgPerQueryResult.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_PerExecutionList ent = dgPerQueryResult.SelectedItems[0] as V_PerExecutionList;

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

            switch (iBudgetRecordType)
            {
            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;
            }

            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) => { });
        }