Пример #1
0
        public void Rename_GL_Account_Bank(GLAccountRepo GLARepo)
        {
            try
            {
                //Get connectoin
                var app = new AppSettings();
                con = app.GetConnection();

                var param = new DynamicParameters();
                param.Add(name: "P_COL_ID", value: GLARepo.COL_ID, dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "P_GL_ACCOUNT_NO", value: GLARepo.GL_Account_No, dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "P_SCHEME_FUND_ID", value: GLARepo.Scheme_Fund_Id, dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "P_UPDATE_ID", value: GlobalValue.User_ID, dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "P_UPDATE_DATE", value: GlobalValue.Scheme_Today_Date, dbType: DbType.DateTime, direction: ParameterDirection.Input);

                int result = con.Execute(sql: "MIX_DEFAULT_ACCOUNT_BANK", param: param, commandType: CommandType.StoredProcedure);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (con.State == ConnectionState.Open)
                {
                    con.Close();
                    if (con != null)
                    {
                        con = null;
                    }
                }
            }
        }
Пример #2
0
        public void Add_GL_Account_Bank(GLAccountRepo GLARepo)
        {
            try
            {
                //Get connectoin
                var app = new AppSettings();
                con = app.GetConnection();

                var param = new DynamicParameters();

                param.Add(name: "P_GL_ACCOUNT_NO", value: GLARepo.GL_Account_No, dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "P_GL_ACCOUNT_NAME", value: GLARepo.GL_Account_Name, dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "P_MEMO_CODE", value: "101", dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "P_SCHEME_FUND_ID", value: GLARepo.Scheme_Fund_Id, dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "P_GL_BALANCE", value: "0.00", dbType: DbType.Decimal, direction: ParameterDirection.Input);
                param.Add(name: "P_REC_STATUS", value: "ACTIVE", dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "P_MAKER_ID", value: GlobalValue.User_ID, dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "P_MAKE_DATE", value: GlobalValue.Scheme_Today_Date, dbType: DbType.DateTime, direction: ParameterDirection.Input);

                param.Add(name: "P_BANK_ACCOUNT_NO", value: GLARepo.Bank_Account_Number, dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "P_BANK", value: GLARepo.Bank, dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "P_BANK_BRANCH", value: GLARepo.Bank_Branch, dbType: DbType.String, direction: ParameterDirection.Input);

                int result = con.Execute(sql: "ADD_GL_ACCOUNT_BANK", param: param, commandType: CommandType.StoredProcedure);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (con.State == ConnectionState.Open)
                {
                    con.Close();
                    if (con != null)
                    {
                        con = null;
                    }
                }
            }
        }