public DataTable ViewMedicineInfo(PharmacyStoreInfo mdinfo) { SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = "SELECT *FROM PharmacyTbl"; return(db.ExeReader(cmd)); }
public int insertmdInfo(PharmacyStoreInfo mdinfo) { SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = "INSERT INTO PharmacyTbl (InvoiceN, MedicineName, Details, CompanyName, Quantity, UnitePrice, EntryDate, MfgDate, ExpireDate, LocationAddress) VALUES ('" + mdinfo.InvoiceN + "','" + mdinfo.MedicineName + "','" + mdinfo.Details + "','" + mdinfo.CompanyName + "','" + mdinfo.Quantity + "','" + mdinfo.UnitPrice + "','" + mdinfo.EntryDate + "','" + mdinfo.MfgDate + "','" + mdinfo.ExpireDate + "','" + mdinfo.LocationAddress + "')"; return(db.EXeNonQuery(cmd)); }