public bool SaveItemDetails(INVItemDetail item) { try { if (item.ItemDetailID == 0) { return _IItemDetailsDAOLinq.Add(item); } else { return _IItemDetailsDAOLinq.Edit(item, true); } } catch (Exception ex) { return false; } }
partial void DeleteINVItemDetail(INVItemDetail instance);
partial void UpdateINVItemDetail(INVItemDetail instance);
partial void InsertINVItemDetail(INVItemDetail instance);
private INVItemDetail ItemToObject(int id) { INVItemDetail item = new INVItemDetail(); item.RegistrationID = Convert.ToInt32(txtRegistrationID.Text); item.BagNo = Convert.ToInt32(txtBagNo.Text); item.BagWeight = Convert.ToInt32(ddlWeight.SelectedItem.Text); item.BagFair = Convert.ToInt32(txtBagFair.Text); item.TotalFair = Convert.ToInt32(txtTotalFair.Text); item.Advance = Convert.ToInt32(txtAdvance.Text); item.ItemTypeID = Convert.ToInt32(ddlType.SelectedIndex); return item; }