public static Stocks GetStocksByKioskID_ProdID(int kioskid, int prodid) { var dal = new StocksDAL(); DataRow row = dal.GetStocksByKioskID_ProdID(kioskid, prodid); var ins = new Stocks(); ins.Bind(row); return(ins); }
public static List <Stocks> GetStocksByReferenceAndKioskID(string directsupplier, int kioskid) { var dal = new StocksDAL(); var collection = new List <Stocks>(); foreach (DataRow row in dal.GetStocksByReferenceAndKioskID(directsupplier, kioskid).Rows) { var instance = new Stocks(); instance.Bind3(row); collection.Add(instance); } return(collection); }
public static List <Stocks> GetKioskPhoneStocks(int id, int type) { var dal = new StocksDAL(); var coll = new List <Stocks>(); foreach (DataRow row in dal.GetKioskPhoneStocks(id, type).Rows) { var ins = new Stocks(); ins.Bind2(row); coll.Add(ins); } return(coll); }
private void UpdateStocks(Stocks ins) { base.com.CommandText = "spUpdateStocks"; base.com.Parameters.Clear(); base.com.Parameters.AddWithValue("_ProdID", ins.ProdID); base.com.Parameters.AddWithValue("_KioskID", ins.KioskID); base.com.Parameters.AddWithValue("_StockIn", ins.StockIn); base.com.Parameters.AddWithValue("_Remarks", ins.Remarks); base.com.Parameters.AddWithValue("_CreatedBy", ins.CreatedBy); base.com.Parameters.AddWithValue("_Reference", ins.Reference); base.com.ExecuteScalar(); }
private bool InsertStocks2(Stocks ins) { base.com.CommandText = "spInsertStocks"; base.com.Parameters.Clear(); base.com.Parameters.AddWithValue("_ProdID", ins.ProdID); base.com.Parameters.AddWithValue("_KioskID", ins.KioskID); base.com.Parameters.AddWithValue("_StockIn", ins.StockIn); base.com.Parameters.AddWithValue("_Remarks", ins.Remarks); base.com.Parameters.AddWithValue("_CreatedBy", ins.CreatedBy); base.com.Parameters.AddWithValue("_Reference", ins.Reference); base.com.Parameters.AddWithValue("_DistRec", ins.DistReciept); int res; res = Convert.ToInt32(base.com.ExecuteScalar()); return res > 0; }
private List<Stocks> GetKioskStockByType(int kioskid, int type) { base.com.CommandText = "spGetKioskStockByType"; base.com.Parameters.Clear(); base.com.Parameters.AddWithValue("_KioskID", kioskid); base.com.Parameters.AddWithValue("_Type", type); // MySqlDataAdapter da = new MySqlDataAdapter(base.com); DataTable dt = new DataTable(); da.Fill(dt); var coll = new List<Stocks>(); foreach (DataRow row in dt.Rows) { var ins = new Stocks(); ins.Bind2(row); coll.Add(ins); } return coll; }
private void DeleteStocksByKioskID_ProdID(Stocks ins) { base.com.CommandText = "spDeleteKioskStockByProdIDKioskID"; base.com.Parameters.Clear(); base.com.Parameters.AddWithValue("_KioskID", ins.KioskID); base.com.Parameters.AddWithValue("_ProdID", ins.ProdID); base.com.ExecuteNonQuery(); }
public static List<Stocks> GetStocksByReferenceAndKioskID(string directsupplier, int kioskid) { var dal = new StocksDAL(); var collection = new List<Stocks>(); foreach (DataRow row in dal.GetStocksByReferenceAndKioskID(directsupplier, kioskid).Rows) { var instance = new Stocks(); instance.Bind3(row); collection.Add(instance); } return collection; }
public static Stocks GetStocksByKioskID_ProdID(int kioskid, int prodid) { var dal = new StocksDAL(); DataRow row = dal.GetStocksByKioskID_ProdID(kioskid, prodid); var ins = new Stocks(); ins.Bind(row); return ins; }
public static List<Stocks> GetKioskPhoneStocks(int id, int type) { var dal = new StocksDAL(); var coll = new List<Stocks>(); foreach (DataRow row in dal.GetKioskPhoneStocks(id, type).Rows) { var ins = new Stocks(); ins.Bind2(row); coll.Add(ins); } return coll; }