public St_Stkjournal AddStockJournal(St_Stkjournal stkJournal) { _stockControlDBContext.St_Stkjournals.Add(stkJournal); _stockControlDBContext.SaveChanges(); return(stkJournal); }
public St_Stkjournal EditStockJournal(St_Stkjournal stkJournal) { var stockJournalInDb = GetStockJournal(stkJournal.Stk_Coy); stockJournalInDb.Stk_Branch = stkJournal.Stk_Branch; stockJournalInDb.Stk_Year = stkJournal.Stk_Year; stockJournalInDb.Stk_Month = stkJournal.Stk_Month; stockJournalInDb.Stk_Loc = stkJournal.Stk_Loc; stockJournalInDb.Stk_Type = stkJournal.Stk_Type; stockJournalInDb.Stk_Account = stkJournal.Stk_Account; stockJournalInDb.Stk_Debit = stkJournal.Stk_Debit; stockJournalInDb.Stk_Credit = stkJournal.Stk_Credit; stockJournalInDb.Stk_Rem = stkJournal.Stk_Rem; stockJournalInDb.Stk_Update = stkJournal.Stk_Update; stockJournalInDb.Stk_Period = stkJournal.Stk_Period; return(stockJournalInDb); }
public St_Stkjournal EditStockJournal(St_Stkjournal stkJournal) { var stockJournalInDb = _stockControlDBContext.St_Stkjournals.SingleOrDefault(x => x.Stk_Coy == stkJournal.Stk_Coy); if (stockJournalInDb != null) { stockJournalInDb.Stk_Debit = stkJournal.Stk_Debit; stockJournalInDb.Stk_Credit = stkJournal.Stk_Credit; stockJournalInDb.Stk_Rem = stkJournal.Stk_Rem; stockJournalInDb.Stk_Update = stkJournal.Stk_Update; stockJournalInDb.Stk_Period = stkJournal.Stk_Period; _stockControlDBContext.St_Stkjournals.Update(stockJournalInDb); _stockControlDBContext.SaveChanges(); } return(stkJournal); }
public void DeleteStockJournal(St_Stkjournal stkJournal) { stockJournals.Remove(stkJournal); }
public St_Stkjournal AddStockJournal(St_Stkjournal stkJournal) { stockJournals.Add(stkJournal); return(stkJournal); }
public void DeleteStockJournal(St_Stkjournal stkJournal) { _stockControlDBContext.St_Stkjournals.Remove(stkJournal); _stockControlDBContext.SaveChanges(); }