Example #1
0
 public void Set(TblQuotationDetailTemplate ob)
 {
     if (ob.Id <= 0)
     {
         db.TblQuotationDetailTemplate.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #2
0
        public async Task <IActionResult> Putshop(long id, shop shop)
        {
            if (id != shop.Id)
            {
                return(BadRequest());
            }

            _context.Entry(shop).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!shopExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Example #3
0
        public void UpdateDetail(TransferDetail ob)
        {
            db.Entry(ob).State = EntityState.Modified;

            /* if (ob.TransferId == 0)
             * { db.TransferDetail.Add(ob); }
             * else { db.Entry(ob).State = EntityState.Modified; }*/
        }
Example #4
0
 public void Set(TblSaleOrderAttachment ob)
 {
     if (ob.Id <= 0)
     {
         db.TblSaleOrderAttachment.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #5
0
 public void Set(TblBankAccount ob)
 {
     if (ob.AcctId == 0)
     {
         db.TblBankAccount.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #6
0
 public void Set(TblPile ob)
 {
     if (ob.PileId == 0)
     {
         db.TblPile.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
 public void Set(TblDepartmentPosition ob)
 {
     if (ob.PositionId <= 0)
     {
         db.TblDepartmentPosition.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #8
0
 public void Set(TblQuotation ob)
 {
     if (ob.QuotationId <= 0)
     {
         db.TblQuotation.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #9
0
 public void Set(TblPileSeries ob)
 {
     if (ob.SeriesId == 0)
     {
         db.TblPileSeries.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #10
0
 public void Set(TblJobOrderAttachmentType ob)
 {
     if (ob.AttachmentTypeId == 0)
     {
         db.TblJobOrderAttachmentType.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #11
0
 public void Set(TblWareHouse ob)
 {
     if (ob.Whid == 0)
     {
         db.TblWareHouse.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
 public void Set(TblCustomerAddress ob)
 {
     if (ob.AddressId <= 0)
     {
         db.TblCustomerAddress.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
 public void Set(TblCustomerContact ob)
 {
     if (ob.ContactId <= 0)
     {
         db.TblCustomerContact.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #14
0
 public void Set(TblPayment ob)
 {
     if (ob.PaymentId == 0)
     {
         db.TblPayment.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
 public void Set(TblProductCategory ob)
 {
     if (ob.CategoryId == 0)
     {
         db.TblProductCategory.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
 public void Set(TblEmployeeUserPermission ob)
 {
     if (ob.AccountId <= 0)
     {
         db.TblEmployeeUserPermission.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #17
0
 public void Set(TblCustomerGroup ob)
 {
     if (ob.GroupId <= 0)
     {
         db.TblCustomerGroup.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #18
0
 public void Set(TblDepartment ob)
 {
     if (ob.DepartmentId <= 0)
     {
         db.TblDepartment.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #19
0
 public void Set(TblProductType ob)
 {
     if (ob.TypeId == 0)
     {
         db.TblProductType.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #20
0
 public void Set(SysSubDistrict ob)
 {
     if (ob.SubDistrictId == 0)
     {
         db.SysSubDistrict.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #21
0
 public void Set(TblProductModel ob)
 {
     if (ob.ModelId == 0)
     {
         db.TblProductModel.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #22
0
 public void Set(TransferStockHeader ob)
 {
     if (ob.TransferStockId == 0)
     {
         db.TransferStockHeader.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
 public void Set(TblSaleOrderDetail ob)
 {
     if (ob.Id <= 0)
     {
         db.TblSaleOrderDetail.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
 public void Set(TblProductOfWareHouse ob)
 {
     if (!ob.IsUpdate)
     {
         db.TblProductOfWareHouse.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #25
0
 public void Set(TblInvoice ob)
 {
     if (ob.InvoiceId <= 0)
     {
         db.TblInvoice.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }
Example #26
0
 public void Set(TblEmployee ob)
 {
     if (ob.EmpId <= 0)
     {
         db.TblEmployee.Add(ob);
     }
     else
     {
         db.Entry(ob).State = EntityState.Modified;
     }
 }