Exemple #1
0
        public long SaveRequistion(Requistion requistion, string userId)
        {
            var requistionDTO = new DTO.RequistionDTO()
            {
                RequistionId     = requistion.RequistionId,
                Response         = requistion.Response,
                StatusId         = requistion.StatusId,
                RequistionNumber = requistion.RequistionNumber,
                Amount           = requistion.Amount,
                ApprovedById     = requistion.ApprovedById,
                BranchId         = requistion.BranchId,
                Description      = requistion.Description,
                Deleted          = requistion.Deleted,
                CreatedBy        = requistion.CreatedBy,
                CreatedOn        = requistion.CreatedOn,
            };

            var requistionId = this._dataService.SaveRequistion(requistionDTO, userId);

            if (requistion.ApprovedById != null)
            {
                UpdateRequistion(requistion.RequistionId, requistionStatusIdComplete, requistion.ApprovedById);
            }
            else
            {
                SendEmail(requistionDTO, userId);
            }

            return(requistionId);
        }
Exemple #2
0
        public long SaveRequistion(Requistion requistion, string userId)
        {
            var requistionDTO = new DTO.RequistionDTO()
            {
                RequistionId     = requistion.RequistionId,
                Response         = requistion.Response,
                StatusId         = requistion.StatusId,
                RequistionNumber = requistion.RequistionNumber,
                ApprovedById     = requistion.ApprovedById,
                BranchId         = requistion.BranchId,
                Description      = requistion.Description,
                Deleted          = requistion.Deleted,
                CreatedBy        = requistion.CreatedBy,
                CreatedOn        = requistion.CreatedOn,
            };

            var requistionId = this._dataService.SaveRequistion(requistionDTO, userId);

            //SendEmail(requistionDTO);
            return(requistionId);
        }