Beispiel #1
0
        public static List <Voucher2Post> GetCurrentMonthTransactionsList(int officeID)
        {
            List <Voucher2Post> TheVoucher2PostList      = new List <Voucher2Post>();
            DataTable           TheVoucher2PostDataTable = AccountsTransactionsDataAccess.GetInstance.GetCurrentMonthTransactionsList(officeID);

            foreach (DataRow dr in TheVoucher2PostDataTable.Rows)
            {
                Voucher2Post TheVoucher2Post = new Voucher2Post();

                TheVoucher2Post.TranDate           = DateTime.Parse(dr["TRAN. DATE"].ToString()).ToString(MicroConstants.DateFormat);
                TheVoucher2Post.TranNumber         = int.Parse(dr["TRAN. NO."].ToString());
                TheVoucher2Post.VoucherNumber      = dr["VOUCHER NO."].ToString();
                TheVoucher2Post.SerialNumber       = int.Parse(dr["SL. NO."].ToString());
                TheVoucher2Post.AccountsID         = int.Parse(dr["ACC. ID"].ToString());
                TheVoucher2Post.AccountCode        = dr["ACC. CODE"].ToString();
                TheVoucher2Post.AccountDescription = dr["ACC. DESC"].ToString().ToUpper();
                TheVoucher2Post.TranType           = dr["TRAN. TYPE"].ToString();
                TheVoucher2Post.TranAmount         = decimal.Parse(dr["TRAN. AMOUNT"].ToString());
                TheVoucher2Post.BalanceType        = dr["DR./CR."].ToString();
                TheVoucher2Post.Narration          = dr["ACC. NARRATION"].ToString();
                TheVoucher2Post.IsPosted           = dr["IsPosted"] != DBNull.Value ? dr["IsPosted"].ToString() : "N";
                TheVoucher2Post.PostedBy           = dr["PostedByUserID"] != DBNull.Value ? int.Parse(dr["PostedByUserID"].ToString()) : 0;

                TheVoucher2Post.PostedDate = dr["DateOfPosting"] != DBNull.Value ? dr["DateOfPosting"].ToString() : "";
                TheVoucher2Post.PostMode   = dr["ModeOfPosting"].ToString();

                TheVoucher2Post.ACC_YEAR_ID        = int.Parse(dr["ACC. YEAR ID"].ToString());
                TheVoucher2Post.ACC_YEAR_CODE      = dr["ACC. YEAR CODE"].ToString();
                TheVoucher2Post.CURRENT_START_DATE = dr["YEAR START DT."].ToString();
                TheVoucher2Post.CURRENT_END_DATE   = dr["YEAR CLOSE DT."].ToString();

                TheVoucher2Post.AccountGroupDescription = dr["GROUP-NAME"].ToString();

                TheVoucher2Post.OfficeTypeID     = int.Parse(dr["Office Type id"].ToString());
                TheVoucher2Post.OfficeTypeName   = dr["Type of Office"].ToString();
                TheVoucher2Post.OfficeID         = int.Parse(dr["Office ID"].ToString());
                TheVoucher2Post.OfficeName       = dr["Name Of The Office"].ToString();
                TheVoucher2Post.OfficeCode       = dr["Office Code"].ToString();
                TheVoucher2Post.SocietyID        = int.Parse(dr["SOCIETY ID"].ToString());
                TheVoucher2Post.SocietyName      = dr["SOCIETY NAME"].ToString();
                TheVoucher2Post.SocietyAliasName = dr["SOCIETY ALIAS"].ToString();
                TheVoucher2Post.SocietyCode      = dr["SOCIETY CODE"].ToString();

                TheVoucher2PostList.Add(TheVoucher2Post);
            }
            return(TheVoucher2PostList);
        }
Beispiel #2
0
        public static List <Voucher2Post> GetValidTransactions()
        {
            List <Voucher2Post> TheVoucher2PostList      = new List <Voucher2Post>();
            DataTable           TheVoucher2PostDataTable = AccountsTransactionsDataAccess.GetInstance.GetValidTransactionsList();


            foreach (DataRow dr in TheVoucher2PostDataTable.Rows)
            {
                Voucher2Post TheVoucher2Post = new Voucher2Post();

                TheVoucher2Post.TranDate           = dr["TRAN. DATE"].ToString();
                TheVoucher2Post.TranNumber         = int.Parse(dr["TRAN. NO."].ToString());
                TheVoucher2Post.SerialNumber       = int.Parse(dr["SL. NO."].ToString());
                TheVoucher2Post.AccountsID         = int.Parse(dr["ACC. ID"].ToString());
                TheVoucher2Post.AccountCode        = dr["ACC. CODE"].ToString();
                TheVoucher2Post.AccountDescription = dr["ACC. DESC"].ToString();
                TheVoucher2Post.TranType           = dr["TRAN. TYPE"].ToString();
                TheVoucher2Post.TranAmount         = decimal.Parse(dr["TRAN. AMOUNT"].ToString());
                TheVoucher2Post.BalanceType        = dr["DR./CR."].ToString();
                TheVoucher2Post.Narration          = dr["ACC. NARRATION"].ToString();
                if (dr["IsPosted"] != DBNull.Value)
                {
                    TheVoucher2Post.IsPosted = dr["IsPosted"].ToString();
                }
                else
                {
                    TheVoucher2Post.IsPosted = "";
                }
                if (dr["PostedByUserID"] != DBNull.Value)
                {
                    TheVoucher2Post.PostedBy = int.Parse(dr["PostedByUserID"].ToString());
                }
                else
                {
                    TheVoucher2Post.PostedBy = Micro.Commons.Connection.LoggedOnUser.UserID;
                }
                if (dr["DateOfPosting"] != DBNull.Value)
                {
                    TheVoucher2Post.PostedDate = dr["DateOfPosting"].ToString();
                }
                else
                {
                    TheVoucher2Post.PostedDate = dr["TRAN. DATE"].ToString();
                }
                TheVoucher2Post.PostMode = dr["ModeOfPosting"].ToString();


                TheVoucher2Post.ACC_YEAR_ID        = int.Parse(dr["ACC. YEAR ID"].ToString());
                TheVoucher2Post.ACC_YEAR_CODE      = dr["ACC. YEAR CODE"].ToString();
                TheVoucher2Post.CURRENT_START_DATE = dr["YEAR START DT."].ToString();
                TheVoucher2Post.CURRENT_END_DATE   = dr["YEAR CLOSE DT."].ToString();
                //TheAccounts_DailyTransactions.PREVIOUS_START_DATE = dr["PREVIOUS_START_DATE"].ToString();
                //TheAccounts_DailyTransactions.PREVIOUS_END_DATE = dr["PREVIOUS_END_DATE"].ToString();
                //TheAccounts_DailyTransactions.BOOK_CLOSING_FLAG = dr["BOOK_CLOSING_FLAG"].ToString();
                //TheAccounts_DailyTransactions.YEAR_CLOSING_FLAG = dr["YEAR_CLOSING_FLAG"].ToString();
                //TheAccounts_DailyTransactions.STATUS_FLAG = dr["STATUS_FLAG"].ToString();
                //TheAccounts_DailyTransactions.MOD_DATE = dr["MOD_DATE"].ToString();
                //TheAccounts_DailyTransactions.AUTH_CODE = dr["AUTH_CODE"].ToString();

                //TheAccounts_DailyTransactions.AccountGroupID = int.Parse(dr["AccountGroupID"].ToString());
                TheVoucher2Post.AccountGroupDescription = dr["GROUP-NAME"].ToString();

                TheVoucher2Post.OfficeTypeID     = int.Parse(dr["Office Type id"].ToString());
                TheVoucher2Post.OfficeTypeName   = dr["Type of Office"].ToString();
                TheVoucher2Post.OfficeID         = int.Parse(dr["Office ID"].ToString());
                TheVoucher2Post.OfficeName       = dr["Name Of The Office"].ToString();
                TheVoucher2Post.OfficeCode       = dr["Office Code"].ToString();
                TheVoucher2Post.SocietyID        = int.Parse(dr["SOCIETY ID"].ToString());
                TheVoucher2Post.SocietyName      = dr["SOCIETY NAME"].ToString();
                TheVoucher2Post.SocietyAliasName = dr["SOCIETY ALIAS"].ToString();
                TheVoucher2Post.SocietyCode      = dr["SOCIETY CODE"].ToString();

                TheVoucher2PostList.Add(TheVoucher2Post);
            }
            return(TheVoucher2PostList);
        }