예제 #1
0
        public IHttpActionResult UpdatePreparationPriceList(object obj)
        {
            AuthorizationUser AuUser = new AuthorizationUser();

            Bis.PreparationPriceListMethod BisPreparationPriceList = new Bis.PreparationPriceListMethod();

            try
            {
                JObject JsonObject = JObject.Parse(obj.ToString());
                JsonObject.Add("IDPersonel", AuUser.ReturnIDUser(JsonObject["IDLogUser"].ToString().StringToGuid()));
                ViewModel.tblPreparationPriceList update = JsonObject.ToObject <ViewModel.tblPreparationPriceList>();
                bool ret = BisPreparationPriceList.UpdatePreparationPriceList(update);
                if (ret)
                {
                    return(Ok(ret));
                }
                else
                {
                    return(NotFound());
                }
            }
            catch
            {
                return(NotFound());
            }
        }
예제 #2
0
        public IHttpActionResult GetPreparationPriceList(object obj)
        {
            try
            {
                Bis.PreparationPriceListMethod    BisPreparationPriceList = new Bis.PreparationPriceListMethod();
                ViewModel.tblPreparationPriceList get = new ViewModel.tblPreparationPriceList();

                JObject JsonObject = JObject.Parse(obj.ToString());
                get.IDSupplier = JsonObject["IDSupplier"].ToString().StringToGuid();
                JArray JsonPreparationPriceList = BisPreparationPriceList.GetPreparationPriceList(get);
                return(Ok(JsonPreparationPriceList));
            }
            catch
            {
                return(NotFound());
            }
        }
예제 #3
0
 public IHttpActionResult UpdatePreparationPriceListByShow(object obj)
 {
     Bis.PreparationPriceListMethod BisPreparationPriceList = new Bis.PreparationPriceListMethod();
     try
     {
         JObject JsonObject = JObject.Parse(obj.ToString());
         ViewModel.tblPreparationPriceList update = JsonObject.ToObject <ViewModel.tblPreparationPriceList>();
         bool ret = BisPreparationPriceList.UpdatePreparationPriceListByShow(update);
         if (ret)
         {
             return(Ok(ret));
         }
         else
         {
             return(NotFound());
         }
     }
     catch
     {
         return(NotFound());
     }
 }
예제 #4
0
 public IHttpActionResult DeletePreparationPriceList(object obj)
 {
     try
     {
         Bis.PreparationPriceListMethod BisPreparationPriceList = new Bis.PreparationPriceListMethod();
         JObject JsonObject = JObject.Parse(obj.ToString());
         ViewModel.tblPreparationPriceList del = JsonObject.ToObject <ViewModel.tblPreparationPriceList>();
         bool ret = BisPreparationPriceList.DeletePreparationPriceList(del);
         if (ret)
         {
             return(Ok(ret));
         }
         else
         {
             return(NotFound());
         }
     }
     catch
     {
         return(NotFound());
     }
 }