public virtual int Delete(int id) { try { PRODUCT_DETAIL_SIZE cus = this.GetById(id); return(this.Delete(cus)); } catch (Exception e) { throw new Exception(e.Message); } }
public virtual void Remove(PRODUCT_DETAIL_SIZE cus) { try { db.PRODUCT_DETAIL_SIZEs.DeleteOnSubmit(cus); db.SubmitChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public virtual void Remove(int id) { try { PRODUCT_DETAIL_SIZE cus = this.GetById(id); this.Remove(cus); } catch //(Exception e) { //throw new Exception(e.Message); } }
public virtual void Create(PRODUCT_DETAIL_SIZE cus) { try { this.db.PRODUCT_DETAIL_SIZEs.InsertOnSubmit(cus); db.SubmitChanges(); } catch// (Exception e) { //throw new Exception(e.Message); } }
public virtual int Delete(PRODUCT_DETAIL_SIZE cus) { try { //user.IsDelete = true; db.SubmitChanges(); return(0); } catch (Exception e) { throw new Exception(e.Message); } }
public virtual void Update(PRODUCT_DETAIL_SIZE cus) { try { PRODUCT_DETAIL_SIZE cusOld = this.GetById(cus.ID); cusOld = cus; db.SubmitChanges(); } catch //(Exception e) { //throw new Exception(e.Message); } }
private void Save() { try { int productDetailId = Utils.CIntDef(ddLProductDetail.SelectedValue); var ProductDetailSize = new PRODUCT_DETAIL_SIZE(); ProductDetailSize.PRODUCT_DETAIL_ID = Utils.CIntDef(ddLProductDetail.SelectedValue); ProductDetailSize.D = Utils.CIntDef(txtD.Value); ProductDetailSize.H = Utils.CIntDef(txtH.Value); ProductDetailSize.L = Utils.CIntDef(txtL.Value); ProductDetailSize.W = Utils.CIntDef(txtW.Value); _ProductDetailSizeRepo.Create(ProductDetailSize); } catch { } finally { Response.Redirect("danh-sach-size-san-pham-chi-tiet.aspx?id=" + ddLProductDetail.SelectedValue); } }