예제 #1
0
 // PUT: api/Proveedores/5
 public HttpResponseMessage Put(string id, Supplier supplier)
 {
     if (id != supplier.SupplierID)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest));
     }
     supplierBL.Update(supplier);
     return(Request.CreateResponse(HttpStatusCode.OK));
 }
예제 #2
0
        protected override ResultMessage Save_Update()
        {
            var bl = new SupplierBL();

            var rm = bl.Update(this.Original, this.Current);

            if (rm.Result)
            {
                this.Original = CopyEntity(this.Current);
            }

            return(rm);
        }
예제 #3
0
        public ActionResult Edit(SupplierInfo supplierinfo)
        {
            try
            {
                SupplierBL _bl = new SupplierBL();

                SupplierInfo _obj = new SupplierInfo();
                _obj = _bl.GetbyId(supplierinfo.Id);

                supplierinfo.Number_Contract = _obj.Number_Contract;
                supplierinfo.Created_date    = _obj.Created_date;
                supplierinfo.Created_by      = _obj.Created_by;


                decimal ck = _bl.Update(supplierinfo);
                return(Json(new { success = ck }));
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
                return(Json(new { success = "-1" }));
            }
        }