コード例 #1
0
        public bool SaveBranch(BranchDto branchDetails)
        {
            this.branch = branchDetails.DtoToEntity();

            if (this._branch.Insert(this.branch).IsNull())
            {
                return(false);
            }
            return(true);
        }
コード例 #2
0
        public static IOBalanceEntity.Branch DtoToEntity(this BranchDto dto)
        {
            IOBalanceEntity.Branch entity = null;

            if (!dto.IsNull())
            {
                entity = new IOBalanceEntity.Branch
                {
                    BranchName    = dto.BranchName.ToUpper(),
                    BranchAddress = dto.BranchAddress,
                    BranchDetails = dto.BranchDetails,
                    CreatedBy     = dto.CreatedBy,
                    UpdatedBy     = dto.UpdatedBy,
                    CreatedDate   = dto.CreatedDate,
                    DateUpdated   = dto.DateUpdated,
                    BranchID      = 0
                };
            }

            return(entity);
        }
コード例 #3
0
 public BranchService(IIOBalanceRepository <Branch> branch)
 {
     this._branch = branch;
     this.branch  = new IOBalanceEntity.Branch();
 }