public UserService(IUserRepository repo, ICompanyRepository _cRepo, ICodeTableRepository _ctRepo, IRoleRepository _roleRepo, IUserRolesRepository _userRoleRepo, ISupplierServiceTagsRepository _supplierServiceTagsRepo) { this.repo = repo; cRepo = _cRepo; CTrepo = _ctRepo; roleRepo = _roleRepo; userRolesRepo = _userRoleRepo; supplierServiceTagsRepo = _supplierServiceTagsRepo; }
public CompanyService(ICompanyRepository repo, ICodeTableRepository companyRepo, IUserRepository repoUser, IRatingRepository ratingRepo, ICompanySupplierRepository companySupplierRepo, IRoleRepository roleRepository, IUserRolesRepository userRoleRepository, ISupplierServiceTagsRepository supplierSvsTagRepo) { this.repo = repo; this.codeTableRepo = companyRepo; this.repoUser = repoUser; this.ratingRepo = ratingRepo; this.companySupplierRepo = companySupplierRepo; this.roleRepository = roleRepository; this.userRoleRepository = userRoleRepository; this.supplierServiceTagRepo = supplierSvsTagRepo; }
public VmGenericServiceResult Insert(VmCompanyItem vmItem) { VmGenericServiceResult result = new VmGenericServiceResult(); try { Com.BudgetMetal.DBEntities.Company r = new Com.BudgetMetal.DBEntities.Company(); Copy <VmCompanyItem, Com.BudgetMetal.DBEntities.Company>(vmItem, r); r.IsVerified = false; r.AwardedQuotation = 0; r.SubmittedQuotation = 0; r.BuyerAvgRating = 0; r.SupplierAvgRating = 0; //Max Default RFQ Per Week var codeTableRepo = this.codeTableRepo.Get(10100001); int maxQuotationPerWeek = Convert.ToInt32(codeTableRepo.Result.Value); //Max Default Quote Per Week codeTableRepo = this.codeTableRepo.Get(10100002); int maxRFQPerWeek = Convert.ToInt32(codeTableRepo.Result.Value); r.MaxQuotationPerWeek = maxQuotationPerWeek; r.MaxRFQPerWeek = maxRFQPerWeek; if (r.CreatedBy.IsNullOrEmpty()) { r.CreatedBy = r.UpdatedBy = "System"; } repo.Add(r); repo.Commit(); result.IsSuccess = true; } catch (Exception e) { result.IsSuccess = false; result.Error = e; } return(result); }
public CodeTableService(ICodeTableRepository repo, ICodeCategoryRepository repoC) { this.repo = repo; this.repoCate = repoC; }
public FacebookService(ICodeTableRepository repoCodeTable) { this.repoCodeTable = repoCodeTable; }
public DocumentService(IDocumentRepository documentRepo, ICodeTableRepository codeTableRepo, ICompanyRepository companyRepo) { this.documentRepo = documentRepo; this.codeTableRepo = codeTableRepo; this.companyRepo = companyRepo; }