public DataTable GetCartData(string userId, string customerId, string teratmentID) { sql_class sql = new sql_class(); sql.Where("CustomerID", customerId); sql.Where("teratmentID", teratmentID); sql.Where("GaragID", userId); return(sql.Get("CartModel")); }
public bool deleteItem(string GargeID, string CustomerID, string partID) { sql_class sql = new sql_class(); sql.Where("GaragID", GargeID); sql.Where("CustomerID", CustomerID); sql.Where("ProductId", partID); DataTable data = sql.Delete("CartModel"); return((data.Rows.Count > 0) ? true : false); }
public static string GetozarName(string id) { sql_class sql = new sql_class(); DataTable data = sql.Where("tozeret_cd", id).Get("Manufacturers", "tozar"); return(data.Rows[0]["tozar"].ToString()); }
public static DataTable Info(int ID) { sql_class sql = new sql_class(); DataTable data = sql.Where("CustomerID", ID.ToString()).Get("Vehicle"); return(data); }
//delete repair job in database public bool deleteJob(string teratmentID) { sql_class sql = new sql_class(); sql.Where("teratmentID", teratmentID); DataTable jobDelete = sql.Delete("RepairJob"); return((jobDelete.Rows.Count > 0) ? true : false); }
// //delete teratmient All part from cart database public bool deleteAllCart(string teratmentID) { sql_class cart = new sql_class(); cart.Where("teratmentID", teratmentID); DataTable cartDelete = cart.Delete("CartModel"); return((cartDelete.Rows.Count > 0) ? true : false); }
//End and close repiarJob public bool cartItemChengaStatus(string teratmentID) { sql_class sql = new sql_class(); sql.Where("teratmentID", teratmentID); var Dblist = new List <DbListAdapter>(); Dblist.Add(new DbListAdapter("order_Status", "false")); bool updateOrnot = sql.Update("CartModel", Dblist); return(updateOrnot); }
//End and close repiarJob public bool closeRepiarJob(string teratmentID) { var nowDataTime = DateTime.Now.ToString("yyyy-MM-dd h:mm:ss tt"); sql_class sql = new sql_class(); sql.Where("teratmentID", teratmentID); var Dblist = new List <DbListAdapter>(); Dblist.Add(new DbListAdapter("Status", "false")); Dblist.Add(new DbListAdapter("EndDate", nowDataTime)); bool updateOrnot = sql.Update("RepairJob", Dblist); return(updateOrnot); }
public List <RepairJobl> AllHistory(string Id) { List <RepairJobl> list = new List <RepairJobl>(); sql_class sql = new sql_class(); sql.Where("GaragID", Id); DataTable data = sql.Get("RepairJob"); for (int i = 0; i < data.Rows.Count; i++) { RepairJobl Teratment = new RepairJobl(Convert.ToInt32(data.Rows[i]["teratmentID"])); list.Add(Teratment); } return(list); }
public static DataTable GeModelName(string id, string Shnat_Yitzur, string Tozeret_cd) { //List<string> dagemInfo = new List<string>(); sql_class sql = new sql_class(); DataTable data = sql.Where("degem_cd", id) .Where("shnat_yitzur", Shnat_Yitzur) .Where("tozeret_cd", Tozeret_cd) .Get("Model"); if (data.Rows.Count > 0) { return(data); } else { return(null); } }
public static DataTable GetParts(string id, params string[] fields) { sql_class sql_ = new sql_class(); if (fields.Length > 0) { foreach (string fiald in fields) { if (!string.IsNullOrEmpty(fiald)) { sql_.OrWhere("ProdectGroup", fiald); } } } sql_.Where("GaragID", id); DataTable data = sql_.Get("PartModel"); return(data); }