public void createInvAdjVoc(Inventory_Adjustment_Voucher invAV) { ContextDB.Inventory_Adjustment_Voucher.AddObject(invAV); ContextDB.SaveChanges(); dalUtl.update_GenID("Adjustment_Voucher"); }
public List<Inventory_Adjustment_Voucher> getInvAdjVoc(Inventory_Adjustment_Voucher invAV) { var q = from i in ContextDB.Inventory_Adjustment_Voucher where (i.Voucher_ID == invAV.Voucher_ID || invAV.Voucher_ID == null) && (i.Date_Issue == invAV.Date_Issue || invAV.Date_Issue == null) && (i.AuthorizedBy_ID == invAV.AuthorizedBy_ID || invAV.AuthorizedBy_ID == null) && (i.Authorized_By == invAV.Authorized_By || invAV.Authorized_By == null) select i; return q.ToList<Inventory_Adjustment_Voucher>(); }
public bool deleteInvAdjVoc(Inventory_Adjustment_Voucher invAV) { try { ContextDB.Inventory_Adjustment_Voucher.DeleteObject(invAV); ContextDB.SaveChanges(); return true; } catch (Exception e) { return false; } }
public bool updateInvAdjVoc(Inventory_Adjustment_Voucher invAV) { try { Inventory_Adjustment_Voucher updIAV = getInvAdjVocByID(invAV.Voucher_ID); updIAV.Date_Issue = invAV.Date_Issue == null ? updIAV.Date_Issue : invAV.Date_Issue; updIAV.AuthorizedBy_ID = invAV.AuthorizedBy_ID == null ? updIAV.AuthorizedBy_ID : invAV.AuthorizedBy_ID; updIAV.Authorized_By = invAV.Authorized_By == null ? updIAV.Authorized_By : invAV.Authorized_By; ContextDB.SaveChanges(); return true; } catch (Exception e) { return false; } }
public void saveVoucherInfo(String voucherId, DateTime issueDate, string authID, String authrizedBy) { Inventory_Adjustment_Voucher inventVoucher = new Inventory_Adjustment_Voucher(); Inv_Adjustment_Voucher_Ent invenEnt = new Inv_Adjustment_Voucher_Ent(); inventVoucher.Voucher_ID = voucherId; inventVoucher.Date_Issue = issueDate; inventVoucher.AuthorizedBy_ID = authID; inventVoucher.Authorized_By = authrizedBy; invenEnt.createInvAdjVoc(inventVoucher); }
/// <summary> /// Deprecated Method for adding a new object to the Inventory_Adjustment_Voucher EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToInventory_Adjustment_Voucher(Inventory_Adjustment_Voucher inventory_Adjustment_Voucher) { base.AddObject("Inventory_Adjustment_Voucher", inventory_Adjustment_Voucher); }
/// <summary> /// Create a new Inventory_Adjustment_Voucher object. /// </summary> /// <param name="voucher_ID">Initial value of the Voucher_ID property.</param> public static Inventory_Adjustment_Voucher CreateInventory_Adjustment_Voucher(global::System.String voucher_ID) { Inventory_Adjustment_Voucher inventory_Adjustment_Voucher = new Inventory_Adjustment_Voucher(); inventory_Adjustment_Voucher.Voucher_ID = voucher_ID; return inventory_Adjustment_Voucher; }