public static int Insert(tbl_RefundGoods refund) { using (var con = new inventorymanagementEntities()) { con.tbl_RefundGoods.Add(refund); con.SaveChanges(); int kq = refund.ID; return(kq); } }
public static tbl_RefundGoods GetOrderByID(int ID) { using (var dbe = new inventorymanagementEntities()) { tbl_RefundGoods acc = dbe.tbl_RefundGoods.Where(a => a.ID == ID && a.Status == 1).FirstOrDefault(); if (acc != null) { return(acc); } else { return(null); } } }
public static int Insert(int AgentID, string TotalPrice, int Status, int CustomerID, double TotalQuantity, string TotalRefundFee, string AgentName, string CustomerName, string CustomerPhone, DateTime CreatedDate, string CreatedBy, string RefundNote) { using (var dbe = new inventorymanagementEntities()) { tbl_RefundGoods a = new tbl_RefundGoods(); a.AgentID = AgentID; a.TotalPrice = TotalPrice; a.Status = Status; a.CustomerID = CustomerID; a.TotalQuantity = TotalQuantity; a.TotalRefundFee = TotalRefundFee; a.AgentName = AgentName; a.CustomerName = CustomerName; a.CustomerPhone = CustomerPhone; a.CreatedDate = CreatedDate; a.CreatedBy = CreatedBy; a.RefundNote = RefundNote; dbe.tbl_RefundGoods.Add(a); dbe.SaveChanges(); int kq = a.ID; return(kq); } }