コード例 #1
0
        public void ApproveRecord(setup_IssuerRepo setup_issuerrepo)
        {
            try
            {
                var param = new DynamicParameters();


                setup_issuerrepo.Auth_Status = "AUTHORIZED";

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

                db.GetConnection().Execute(sql: "SETUP_PROCEDURES.APP_SETUP_ISSUER", param: param, commandType: CommandType.StoredProcedure);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                db.Dispose();
            }
        }
コード例 #2
0
        public void SaveRecord(setup_IssuerRepo setup_issuerrepo)
        {
            try
            {
                var param = new DynamicParameters();

                if (string.IsNullOrEmpty(setup_issuerrepo.Issuer_Id))
                {
                    setup_issuerrepo.Auth_Status = "AUTHORIZED";

                    param.Add(name: "P_ISSUER_NAME", value: setup_issuerrepo.Issuer_Name, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_POSTAL_ADDRESS", value: setup_issuerrepo.Postal_Address, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_EMAIL_ADDRESS", value: setup_issuerrepo.Email_Address, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_MOBILE_NUMBER", value: setup_issuerrepo.Mobile_Number, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_PHONE_NUMBER", value: setup_issuerrepo.Phone_Number, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_AUTH_STATUS", value: setup_issuerrepo.Auth_Status, 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: DateTime.Today, dbType: DbType.Date, direction: ParameterDirection.Input);

                    db.GetConnection().Execute(sql: "SETUP_PROCEDURES.ADD_SETUP_ISSUER", param: param, commandType: CommandType.StoredProcedure);
                }
                else
                {
                    setup_issuerrepo.Auth_Status = "AUTHORIZED";

                    param.Add(name: "P_ISSUER_ID", value: setup_issuerrepo.Issuer_Id, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_ISSUER_NAME", value: setup_issuerrepo.Issuer_Name, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_POSTAL_ADDRESS", value: setup_issuerrepo.Postal_Address, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_EMAIL_ADDRESS", value: setup_issuerrepo.Email_Address, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_MOBILE_NUMBER", value: setup_issuerrepo.Mobile_Number, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_PHONE_NUMBER", value: setup_issuerrepo.Phone_Number, dbType: DbType.String, direction: ParameterDirection.Input);
                    param.Add(name: "P_AUTH_STATUS", value: setup_issuerrepo.Auth_Status, 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: DateTime.Today, dbType: DbType.Date, direction: ParameterDirection.Input);

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