예제 #1
0
        public object addstore(TB_ECOMM_PICKUP_STORES store)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            IStores     iorder = new StoresImpl();
            ApiResponse rs     = iorder.addstore(store);

            return(rs);
        }
예제 #2
0
 public ApiResponse addstore(TB_ECOMM_PICKUP_STORES store)
 {
     try
     {
         TB_ECOMM_PICKUP_STORES PS = new TB_ECOMM_PICKUP_STORES();
         PS.CREATED_DATE          = DateTime.Now;
         PS.MODIFIED_DATE         = DateTime.Now;
         PS.PICKUP_STORE_ADDRESS1 = store.PICKUP_STORE_ADDRESS1;
         PS.PICKUP_STORE_ADDRESS2 = store.PICKUP_STORE_ADDRESS2;
         PS.PICKUP_STORE_NAME     = store.PICKUP_STORE_NAME;
         entity.TB_ECOMM_PICKUP_STORES.Add(PS);
         entity.SaveChanges();
         return(new ApiResponse
         {
             Status = "Success", Message = "Store Saved."
         });
     }
     catch (Exception ex)
     {
         throw new Exception("Error" + ex.Message);
     }
 }