public DepartmentHeadServiceImpl(RequisitionRepo rrepo, RequisitionDetailRepo rdrepo, EmployeeRepo erepo, DepartmentRepo drepo, IMailer mailservice, CollectionPointRepo crepo) { this.rrepo = rrepo; this.rdrepo = rdrepo; this.erepo = erepo; this.drepo = drepo; this.mailservice = mailservice; this.crepo = crepo; }
public IHttpActionResult CreateCollectionPoint(CollectionPointModel cp) { string error = ""; CollectionPointModel cpm = CollectionPointRepo.CreateCollectionPoint(cp, out error); if (error != "" || cpm == null) { return(Content(HttpStatusCode.BadRequest, error)); } return(Ok(cpm)); }
public DepartmentEmpServiceImpl(RequisitionRepo rrepo, RequisitionDetailRepo rdrepo, ProductRepo prepo, EmployeeRepo erepo, DepartmentRepo drepo, CollectionPointRepo cprepo, IMailer mailservice) { this.rrepo = rrepo; this.rdrepo = rdrepo; this.prepo = prepo; this.erepo = erepo; this.drepo = drepo; this.cprepo = cprepo; this.mailservice = mailservice; }
public StoreSupServiceImpl(AdjustmentVoucherRepo avrepo, EmployeeRepo erepo, PurchaseRequestRepo purreqrepo, PurchaseOrderRepo porepo, SupplierRepo srepo, CollectionPointRepo crepo, IMailer mailservice, PurchaseOrderDetailRepo podrepo, TransactionRepo trepo) { this.avrepo = avrepo; this.erepo = erepo; this.purreqrepo = purreqrepo; this.porepo = porepo; this.srepo = srepo; this.crepo = crepo; this.mailservice = mailservice; this.podrepo = podrepo; this.trepo = trepo; }
public IHttpActionResult GetCollectionPointByDeptid(int deptid) { string error = ""; List <CollectionPointModel> cpm = CollectionPointRepo.GetCollectionPointByDeptid(deptid, out error); if (error != "" || cpm == null) { if (error == ConError.Status.NOTFOUND) { return(Content(HttpStatusCode.NotFound, "Department Not Found")); } return(Content(HttpStatusCode.BadRequest, error)); } return(Ok(cpm)); }
public IHttpActionResult UpdateCollectionPoint(CollectionPointModel cp) { string error = ""; CollectionPointModel cpm = CollectionPointRepo.UpdateCollectionPoint(cp, out error); if (error != "" || cpm == null) { if (error == ConError.Status.NOTFOUND) { return(Content(HttpStatusCode.NotFound, "CollectionPoint Not Found")); } return(Content(HttpStatusCode.BadRequest, error)); } return(Ok(cpm)); }
public IHttpActionResult GetAllCollectionPoints() { // declare and initialize error variable to accept the error from Repo string error = ""; // get the list from collectionpointrepo and will insert the error if there is one List <CollectionPointModel> cpm = CollectionPointRepo.GetAllCollectionPoint(out error); // if the erorr is not blank or the collectionpoint list is null if (error != "" || cpm == null) { // if the error is 404 if (error == ConError.Status.NOTFOUND) { return(Content(HttpStatusCode.NotFound, "CollectionsPoints Not Found")); } // if the error is other one return(Content(HttpStatusCode.BadRequest, error)); } // if there is no error return(Ok(cpm)); }