public static List <AccountBookClose> GetMonthByOfficeId(int OfficeId)
        {
            List <AccountBookClose> AccountBookCloseList = new List <AccountBookClose>();
            DataTable AccountingYeartable = AccountingYearDataAccess.GetInstance.GetMonthByOfficeId(OfficeId);

            foreach (DataRow dr in AccountingYeartable.Rows)
            {
                AccountBookClose TheAccountBookClose = DataRow(dr);
                AccountBookCloseList.Add(TheAccountBookClose);
            }
            return(AccountBookCloseList);
        }
        public static AccountBookClose DataRow(DataRow dr)
        {
            AccountBookClose TheAccountBookClose = new AccountBookClose();

            TheAccountBookClose.RecordNumber     = int.Parse(dr["RecordNumber"].ToString());
            TheAccountBookClose.AccountYearID    = int.Parse(dr["AccountYearID"].ToString());
            TheAccountBookClose.AccountYearMonth = dr["AccountYearMonth"].ToString();
            TheAccountBookClose.IsBookClosed     = char.Parse(dr["IsBookClosed"].ToString());
            if (dr["BookCloseDateTime"] != DBNull.Value)
            {
                TheAccountBookClose.BookCloseDateTime = DateTime.Parse(dr["BookCloseDateTime"].ToString()).ToString(MicroConstants.DateFormat);
            }
            TheAccountBookClose.BookClosedByUserID = dr["BookClosedByUserID"] != DBNull.Value ? int.Parse(dr["BookClosedByUserID"].ToString()) : 0;
            TheAccountBookClose.AuthorisationID    = dr["AuthorisationID"] != DBNull.Value ? int.Parse(dr["AuthorisationID"].ToString()) : 0;
            TheAccountBookClose.SocietyID          = int.Parse(dr["SocietyID"].ToString());
            TheAccountBookClose.OfficeID           = int.Parse(dr["OfficeID"].ToString());
            return(TheAccountBookClose);
        }
Exemplo n.º 3
0
        public static List <AccountBookClose> GetAccountsBookCloseList()
        {
            List <AccountBookClose> theAccountBookCloseList = new List <AccountBookClose>();
            DataTable theAccountBookCloseTable = AccountsTransactionsDataAccess.GetInstance.GetAccountsBookCloseList();

            foreach (DataRow dr in theAccountBookCloseTable.Rows)
            {
                AccountBookClose theAccountBookClose = new AccountBookClose();

                theAccountBookClose.RecordNumber       = int.Parse(dr["RecordNumber"].ToString());
                theAccountBookClose.AccountYearID      = int.Parse(dr["AccountYearID"].ToString());
                theAccountBookClose.AccountYearMonth   = dr["AccountYearMonth"].ToString();
                theAccountBookClose.IsBookClosed       = char.Parse(dr["IsBookClosed"].ToString());
                theAccountBookClose.BookClosedByUserID = dr["BookClosedByUserID"] != DBNull.Value ? int.Parse(dr["BookClosedByUserID"].ToString()) : 0;
                theAccountBookClose.BookCloseDateTime  = dr["BookCloseDateTime"] != DBNull.Value ? dr["BookCloseDateTime"].ToString() : string.Empty;
                theAccountBookClose.AuthorisationID    = dr["AuthorisationID"] != DBNull.Value ? int.Parse(dr["AuthorisationID"].ToString()) : 0;
                theAccountBookClose.SocietyID          = int.Parse(dr["SocietyID"].ToString());
                theAccountBookClose.OfficeID           = int.Parse(dr["OfficeID"].ToString());

                theAccountBookCloseList.Add(theAccountBookClose);
            }
            return(theAccountBookCloseList);
        }