Example #1
0
 public PersonalLandDetails(FormTypes formType, int iYear, int iMonth, V_LandStatistic entRev)
 {
     InitializeComponent();
     FormType   = formType;
     iLandYear  = iYear;
     iLandMonth = iMonth;
     entLand    = entRev;
     InitPage();
 }
Example #2
0
 public PersonalLandDetails(FormTypes formType, int iYear, int iMonth, V_LandStatistic entRev)
 {
     InitializeComponent();
     FormType = formType;
     iLandYear = iYear;
     iLandMonth = iMonth;
     entLand = entRev;
     InitPage();
 }
        private void ShowRecordDetails(int iBudgetRecordType)
        {
            if (iBudgetRecordType == 0)
            {
                Utility.ShowCustomMessage(MessageTypes.Message, "登录记录查询", "当前选中项无单据");
                return;
            }

            string strSignInID = string.Empty;

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

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

            int iYear = 0, iMonth = 0;

            int.TryParse(txtBalanceYear.Text, out iYear);

            if (iYear <= 0)
            {
                Utility.ShowCustomMessage(MessageTypes.Message, "登录记录查询", "查询年份必须大于0");
                return;
            }

            V_LandStatistic ent = dgLandStatisticsList.SelectedItems[0] as V_LandStatistic;

            if (string.IsNullOrWhiteSpace(ent.OrganizationID))
            {
                Utility.ShowCustomMessage(MessageTypes.Message, "登录记录查询", "合计项不能查看明细");
                return;
            }

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

            switch (iBudgetRecordType)
            {
            case -1:
                iBudgetRecordType = 3;
                dTimes            = ent.JanTimes;
                iMonth            = 1;
                strTitle          = "一月登录记录明细总览";
                break;

            case -2:
                iBudgetRecordType = 3;
                dTimes            = ent.FebTimes;
                iMonth            = 2;
                strTitle          = "二月登录记录明细总览";
                break;

            case -3:
                iBudgetRecordType = 3;
                dTimes            = ent.MarTimes;
                iMonth            = 3;
                strTitle          = "三月登录记录明细总览";
                break;

            case -4:
                iBudgetRecordType = 3;
                dTimes            = ent.AprTimes;
                iMonth            = 4;
                strTitle          = "四月登录记录明细总览";
                break;

            case -5:
                iBudgetRecordType = 3;
                dTimes            = ent.MayTimes;
                iMonth            = 5;
                strTitle          = "五月登录记录明细总览";
                break;

            case -6:
                iBudgetRecordType = 3;
                dTimes            = ent.JunTimes;
                iMonth            = 6;
                strTitle          = "六月登录记录明细总览";
                break;

            case -7:
                iBudgetRecordType = 3;
                dTimes            = ent.JulTimes;
                iMonth            = 7;
                strTitle          = "七月登录记录明细总览";
                break;

            case -8:
                iBudgetRecordType = 3;
                dTimes            = ent.AugTimes;
                iMonth            = 8;
                strTitle          = "八月登录记录明细总览";
                break;

            case -9:
                iBudgetRecordType = 3;
                dTimes            = ent.SepTimes;
                iMonth            = 9;
                strTitle          = "九月登录记录明细总览";
                break;

            case -10:
                iBudgetRecordType = 3;
                dTimes            = ent.OctTimes;
                iMonth            = 10;
                strTitle          = "十月登录记录明细总览";
                break;

            case -11:
                iBudgetRecordType = 3;
                dTimes            = ent.NovTimes;
                iMonth            = 11;
                strTitle          = "十一月登录记录明细总览";
                break;

            case -12:
                iBudgetRecordType = 3;
                dTimes            = ent.DecTimes;
                iMonth            = 12;
                strTitle          = "十二月登录记录明细总览";
                break;
            }

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

            PersonalLandDetails viewRd = new PersonalLandDetails(FormTypes.Browse, iYear, iMonth, ent);

            EntityBrowser entBrowser = new EntityBrowser(viewRd);

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