public int InsertAccountsDailyTransactions(Accounts_DailyTransactions theAccountsDailyTransactions)
        {
            int ReturnValue = 0;
            using (SqlCommand InsertCommand = new SqlCommand())
            {
                InsertCommand.CommandType = CommandType.StoredProcedure;
                InsertCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output;
                InsertCommand.Parameters.Add(GetParameter("@VoucherNumber", SqlDbType.VarChar, theAccountsDailyTransactions.VoucherNumber));
                InsertCommand.Parameters.Add(GetParameter("@TranDate", SqlDbType.VarChar, theAccountsDailyTransactions.TranDate));
                InsertCommand.Parameters.Add(GetParameter("@TranNumber", SqlDbType.Int, theAccountsDailyTransactions.TranNumber));
                InsertCommand.Parameters.Add(GetParameter("@SerialNumber", SqlDbType.Int, theAccountsDailyTransactions.SerialNumber));
                InsertCommand.Parameters.Add(GetParameter("@AccountsID", SqlDbType.Int, theAccountsDailyTransactions.AccountsID));
                InsertCommand.Parameters.Add(GetParameter("@AccountsCode", SqlDbType.VarChar, theAccountsDailyTransactions.AccountCode));
                InsertCommand.Parameters.Add(GetParameter("@TranType", SqlDbType.VarChar, theAccountsDailyTransactions.TranType));
                InsertCommand.Parameters.Add(GetParameter("@TranAmount", SqlDbType.Decimal, theAccountsDailyTransactions.TranAmount));
                InsertCommand.Parameters.Add(GetParameter("@BalanceType", SqlDbType.VarChar, theAccountsDailyTransactions.BalanceType));
                InsertCommand.Parameters.Add(GetParameter("@Narration", SqlDbType.VarChar, theAccountsDailyTransactions.Narration));
                InsertCommand.Parameters.Add(GetParameter("@IsPosted", SqlDbType.VarChar, theAccountsDailyTransactions.IsPosted));
                InsertCommand.Parameters.Add(GetParameter("@PostedBy", SqlDbType.Int, theAccountsDailyTransactions.PostedBy));
                InsertCommand.Parameters.Add(GetParameter("@PostedDate", SqlDbType.VarChar, theAccountsDailyTransactions.PostedDate));
                InsertCommand.Parameters.Add(GetParameter("@PostMode", SqlDbType.VarChar, theAccountsDailyTransactions.PostMode));
                InsertCommand.Parameters.Add(GetParameter("@AccountsYearID", SqlDbType.Int, theAccountsDailyTransactions.AccountsYearID));
                InsertCommand.Parameters.Add(GetParameter("@OfficeID", SqlDbType.Int, theAccountsDailyTransactions.OfficeID));
                InsertCommand.Parameters.Add(GetParameter("@SocietyID", SqlDbType.Int, theAccountsDailyTransactions.SocietyID));
                InsertCommand.Parameters.Add(GetParameter("@AddedBy", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.UserID));
                InsertCommand.CommandText = "pAccounts_Transactions_Insert";

                ExecuteStoredProcedure(InsertCommand);

                ReturnValue = int.Parse(InsertCommand.Parameters[0].Value.ToString());

                return ReturnValue;
            }
        }
Example #2
0
        public static Accounts_DailyTransactions DataRowToObject(DataRow dr)
        {
            Accounts_DailyTransactions TheAccounts_DailyTransactions = new Accounts_DailyTransactions();

            TheAccounts_DailyTransactions.VoucherNumber  = dr["VoucherNumber"].ToString();
            TheAccounts_DailyTransactions.TranDate       = dr["TranDate"].ToString();
            TheAccounts_DailyTransactions.TranNumber     = int.Parse(dr["TranNumber"].ToString());
            TheAccounts_DailyTransactions.SerialNumber   = int.Parse(dr["SerialNumber"].ToString());
            TheAccounts_DailyTransactions.AccountsID     = int.Parse(dr["AccountsID"].ToString());
            TheAccounts_DailyTransactions.AccountCode    = dr["AccountCode"].ToString();
            TheAccounts_DailyTransactions.TranType       = dr["TranType"].ToString();
            TheAccounts_DailyTransactions.TranAmount     = decimal.Parse(dr["TranAmount"].ToString());
            TheAccounts_DailyTransactions.BalanceType    = dr["BalanceType"].ToString();
            TheAccounts_DailyTransactions.Narration      = dr["Narration"].ToString();
            TheAccounts_DailyTransactions.IsPosted       = dr["IsPosted"].ToString();
            TheAccounts_DailyTransactions.PostedBy       = int.Parse(dr["PostedBy"].ToString());
            TheAccounts_DailyTransactions.PostedDate     = dr["PostedDate"].ToString();
            TheAccounts_DailyTransactions.PostMode       = dr["PostMode"].ToString();
            TheAccounts_DailyTransactions.AccountsYearID = int.Parse(dr["AccountsYearID"].ToString());
            TheAccounts_DailyTransactions.OfficeID       = int.Parse(dr["OfficeID"].ToString());
            TheAccounts_DailyTransactions.SocietyID      = int.Parse(dr["SocietyID"].ToString());

            return(TheAccounts_DailyTransactions);
        }
Example #3
0
 public static int InsertAccountsDailyTransactions(Accounts_DailyTransactions theAccountsDailyTransactions)
 {
     return(AccountsTransactionsDataAccess.GetInstance.InsertAccountsDailyTransactions(theAccountsDailyTransactions));
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="theAccountsDailyTransactions"></param>
 /// <returns></returns>
 public int InsertAccountsDailyTransactions(Accounts_DailyTransactions theAccountsDailyTransactions)
 {
     return(AccountsTransactionIntegration.InsertAccountsDailyTransactions(theAccountsDailyTransactions));
 }