コード例 #1
0
        public HttpResponseMessage PostNewBombaTicaBranch([FromBody] BranchOffice value)
        {
            BranchOfficeRegister.GetInstance().AddBranchOffice(BranchOfficeRegister.branchListB, value);
            var response = Request.CreateResponse(HttpStatusCode.Created);

            return(response);
        }
コード例 #2
0
        public HttpResponseMessage PostNewLaBombaBO([FromBody] BranchOffice value)
        {
            BranchOfficeRegister.GetInstance().AddBOLaBomba(value);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created);

            response.Headers.Location = new Uri(Request.RequestUri, String.Format("BranchOffice/{0}", value.BranchOffice_Name));
            return(response);
        }
コード例 #3
0
        public IHttpActionResult GetBombaTicaBranchtById(string name)
        {
            var val = BranchOfficeRegister.GetInstance().GetBranch(BranchOfficeRegister.branchListB, name);

            if (val == null)
            {
                return(NotFound());
            }
            return(Ok(val));
        }
コード例 #4
0
        public HttpResponseMessage DeleteBombaTicaBranch(string id)
        {
            var val = BranchOfficeRegister.GetInstance().RemoveBranchOffice(BranchOfficeRegister.branchListB, id);

            if (val == false)
            {
                var responseA = Request.CreateResponse(HttpStatusCode.NotModified);
                return(responseA);
            }

            var responseB = Request.CreateResponse(HttpStatusCode.Accepted);

            return(responseB);
        }
コード例 #5
0
        public HttpResponseMessage PutBombaTicaBranch(string id, [FromBody] BranchOffice value)
        {
            var val = BranchOfficeRegister.GetInstance().UpdateBranchOffice(BranchOfficeRegister.branchListB, id, value);

            if (val == false)
            {
                var responseA = Request.CreateResponse(HttpStatusCode.NotModified);
                return(responseA);
            }

            var responseB = Request.CreateResponse(HttpStatusCode.Accepted);

            return(responseB);
        }
コード例 #6
0
 public void DeleteLaBombaBO(string name)
 {
     BranchOfficeRegister.GetInstance().RemoveBOLaBomba(name);
 }
コード例 #7
0
 public void UpdateLaBombaBOAdmi(string name, [FromBody] string value)
 {
     BranchOfficeRegister.GetInstance().UpdateBOLBAdmin(BranchOfficeRegister.GetInstance().GetBOLaBomba(name), value);
 }
コード例 #8
0
 public BranchOffice GetLaBombaBOByName(string name)
 {
     return(BranchOfficeRegister.GetInstance().GetBOLaBomba(name));
 }
コード例 #9
0
 public List <BranchOffice> GetAllLaBombaBO()
 {
     return(BranchOfficeRegister.GetInstance().GetAllBOPhyschel());
 }
コード例 #10
0
 public void DeletePhyschelBO(string name)
 {
     BranchOfficeRegister.GetInstance().RemoveBOPhyschel(name);
 }
コード例 #11
0
 public void UpdatePhichelBOAdmi(string name, [FromBody] string value)
 {
     BranchOfficeRegister.GetInstance().UpdateBOPHAdmin(BranchOfficeRegister.GetInstance().GetBOPhyschel(name), value);
 }
コード例 #12
0
 public BranchOffice GetPhyschelBOByName(string name)
 {
     return(BranchOfficeRegister.GetInstance().GetBOPhyschel(name));
 }
コード例 #13
0
 public List <BranchOffice> GetAllBombaTicaBranches()
 {
     return(BranchOfficeRegister.GetInstance().GetAllBranches(BranchOfficeRegister.branchListB));
 }
コード例 #14
0
 public List <BranchOffice> GetAllPhischelBranches()
 {
     return(BranchOfficeRegister.GetInstance().GetAllBranches(BranchOfficeRegister.branchListP));
 }