Beispiel #1
0
        public void ApproveRecord(pfm_FundRepo pfm_fundrepo)
        {
            try
            {
                var param = new DynamicParameters();

                if (string.IsNullOrEmpty(pfm_fundrepo.Fund_Id))
                {
                    pfm_fundrepo.Auth_Status = "AUTHORIZED";

                    param.Add(name: "P_FUND_ID", value: pfm_fundrepo.Fund_Id, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_AUTH_STATUS", value: pfm_fundrepo.Auth_Status, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_AUTH_ID", value: pfm_fundrepo.Auth_Id, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_AUTH_DATE", value: pfm_fundrepo.Auth_Date, dbType: DbType.Date, direction: ParameterDirection.Input);

                    db.GetConnection().Execute(sql: "SETUP_PROCEDURES.APP_PFM_FUND", param: param, commandType: CommandType.StoredProcedure);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                db.Dispose();
            }
        }
Beispiel #2
0
        public void SaveRecord(pfm_FundRepo pfm_fundrepo)
        {
            try
            {
                var param = new DynamicParameters();

                if (string.IsNullOrEmpty(pfm_fundrepo.Fund_Id))
                {
                    pfm_fundrepo.Auth_Status = "AUTHORIZED";
                    param.Add(name: "P_FUND_NAME", value: pfm_fundrepo.Fund_Name, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_FUND_DESCRIPTION", value: pfm_fundrepo.Fund_Description, 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: pfm_fundrepo.Make_Date, dbType: DbType.Date, direction: ParameterDirection.Input);
                    param.Add(name: "P_AUTH_STATUS", value: pfm_fundrepo.Auth_Status, dbType: DbType.String, direction: ParameterDirection.Input);

                    db.GetConnection().Execute(sql: "SETUP_PROCEDURES.ADD_PFM_FUND", param: param, commandType: CommandType.StoredProcedure);
                }
                else
                {
                    pfm_fundrepo.Auth_Status = "AUTHORIZED";
                    param.Add(name: "P_FUND_ID", value: pfm_fundrepo.Fund_Id, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_FUND_NAME", value: pfm_fundrepo.Fund_Name, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_FUND_DESCRIPTION", value: pfm_fundrepo.Fund_Description, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_UPDATE_ID", value: pfm_fundrepo.Update_Id, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_UPDATE_DATE", value: pfm_fundrepo.Update_Date, dbType: DbType.Date, direction: ParameterDirection.Input);
                    param.Add(name: "P_AUTH_STATUS", value: pfm_fundrepo.Auth_Status, dbType: DbType.String, direction: ParameterDirection.Input);

                    db.GetConnection().Execute(sql: "SETUP_PROCEDURES.UPD_PFM_FUND", param: param, commandType: CommandType.StoredProcedure);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                db.Dispose();
            }
        }