private DsAdmRptSredIn UpdCriteria(bool bUpdate)
        {
            DsAdmRptSredIn ds     = new DsAdmRptSredIn();
            DataRow        dr     = ds.Tables["DtAdmRptSredIn"].NewRow();
            TimeZoneInfo   tzinfo = Session["Cache:tzInfo"] as TimeZoneInfo ?? TimeZoneInfo.Local;

            dr["tzInfo"] = tzinfo.StandardName;

            if (cMonthEnding.Text != string.Empty)
            {
                dr["MonthEnding"] = base.SetDateTimeUTC(cMonthEnding.Text, !bUpdate);
            }
            if (IsPostBack && cMonthEnding.Text == string.Empty)
            {
                throw new ApplicationException("Criteria column: MonthEnding should not be empty. Please rectify and try again.");
            }
            ;
            if (cNumMonths.Text != string.Empty)
            {
                dr["NumMonths"] = cNumMonths.Text;
            }
            ds.Tables["DtAdmRptSredIn"].Rows.Add(dr);
            if (bUpdate)
            {
                (new AdminSystem()).UpdRptDt(59, "UpdAdmRptSred", base.LUser.UsrId, ds, GetRptCriteria(), LcAppConnString, LcAppPw);
            }
            return(ds);
        }
示例#2
0
        private DsAdmRptSredIn UpdCriteria(bool bUpdate)
        {
            DsAdmRptSredIn ds = new DsAdmRptSredIn();
            DataRow        dr = ds.Tables["DtAdmRptSredIn"].NewRow();
            bool           bAll = false; string selectedVal = null; DataView dv = null; int TotalChoiceCnt = 0; int CriCnt = 0; bool noneSelected = true;

            if (cMonthEnding.Text != string.Empty)
            {
                dr["MonthEnding"] = base.SetDateTimeUTC(cMonthEnding.Text, !bUpdate);
            }
            if (IsPostBack && cMonthEnding.Text == string.Empty)
            {
                throw new ApplicationException("Criteria column: MonthEnding should not be empty. Please rectify and try again.");
            }
            ;
            if (cNumMonths.Text != string.Empty)
            {
                dr["NumMonths"] = cNumMonths.Text;
            }
            ds.Tables["DtAdmRptSredIn"].Rows.Add(dr);
            if (bUpdate)
            {
                (new AdminSystem()).UpdRptDt(59, "UpdAdmRptSred", base.LUser.UsrId, ds, GetRptCriteria(), LcAppConnString, LcAppPw);
            }
            return(ds);
        }