public string DeletePODETAIL(string PODETAILCode) { string Result = "Success"; try { Purchase_Order_Processing_System.PODETAIL _PODETAIL = poDb.PODETAILs.Where(x => x.ITCODE == PODETAILCode).ToList().FirstOrDefault(); poDb.PODETAILs.Remove(_PODETAIL); poDb.SaveChanges(); } catch (Exception ex) { Result = ex.Message; } return(Result); }
public string UpdatePODETAIL(PODETAIL _PODETAIL) { string Result = "Success"; try { Purchase_Order_Processing_System.PODETAIL _podetail = poDb.PODETAILs.Where(x => x.PONO == _PODETAIL.PONO).ToList().FirstOrDefault(); _podetail.ITCODE = _PODETAIL.ITCODE; _podetail.ITEM = _PODETAIL.ITEM; _podetail.POMASTER = _PODETAIL.POMASTER; _podetail.QTY = _PODETAIL.QTY; poDb.SaveChanges(); } catch (Exception ex) { Result = ex.Message; } return(Result); }