public static bool CreateNewEvent(List <DbListAdapter> data) { sql_class newsql = new sql_class(); return(newsql.Insert("EventsModel", data) ? true : false); }
//Func RegistraionNew_RepairJob public static bool New_RepairJob(List <DbListAdapter> data) { sql_class newsql = new sql_class(); return(newsql.Insert("RepairJob", data) ? true : false); }
public RepairJobl(int id) { DataTable data = new sql_class().Where("teratmentID", id.ToString()).Get("RepairJob"); teratmentID = Convert.ToInt32(data.Rows[0]["teratmentID"]); GaragID = Convert.ToInt32(data.Rows[0]["GaragID"]); CustomerID = Convert.ToInt32(data.Rows[0]["CustomerID"]); TypeID = Convert.ToInt32(data.Rows[0]["TypeID"]); License_Number = data.Rows[0]["License_Number"].ToString(); description = data.Rows[0]["description"].ToString(); StartDate = Convert.ToDateTime(data.Rows[0]["StartDate"]); Status = Convert.ToBoolean(data.Rows[0]["Status"]); Approved_by = data.Rows[0]["Approved_by"].ToString(); Mileage_start = data.Rows[0]["Mileage_start"].ToString(); var isNull = data.Rows[0]["TotalWorkingHours"].ToString(); if (isNull != "") { TotalWorkingHours = Convert.ToInt32(data.Rows[0]["TotalWorkingHours"]); } var isEnddateNull = data.Rows[0]["EndDate"].ToString(); if (isEnddateNull != "") { EndDate = Convert.ToDateTime(data.Rows[0]["EndDate"]); } }
public static DataTable Info(int ID) { sql_class sql = new sql_class(); DataTable data = sql.Where("CustomerID", ID.ToString()).Get("Vehicle"); return(data); }
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 bool create_new_Customer(List <DbListAdapter> data) { sql_class newsql = new sql_class(); return(newsql.Insert("Customer", data) ? true : false); }
public static bool create_new_Employee(List <DbListAdapter> data) { sql_class newsql = new sql_class(); return(newsql.Insert("EmployeModel", data) ? true : false); }
public static bool create_new_Vehicle(List <DbListAdapter> data) { sql_class newsql = new sql_class(); return(newsql.Insert("Vehicle", data) ? true : false); }
public Sticky_Note(int id, int i) { DataTable data = new sql_class().Where("stickyID", id.ToString()).Get("StickyModel"); stickyID = Convert.ToInt32(data.Rows[0]["stickyID"]); gargeID = Convert.ToInt32(data.Rows[0]["GaragID"]); sticky_Message = data.Rows[0]["sticky_Message"].ToString(); }
//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); }
public void New_Stikey(string message, string Session) { sql_class sql = new sql_class(); var Dblist = new List <DbListAdapter>(); Dblist.Add(new DbListAdapter("GaragID", Session)); Dblist.Add(new DbListAdapter("sticky_Message", message)); sql.Insert("StickyModel", Dblist); }
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); }
//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 CustomerModel(string ID) { DataTable data = new sql_class().Where("UsarName", ID).Get("Customer"); CustomerID = Convert.ToInt32(data.Rows[0]["CustomerID"]); GaragID = Convert.ToInt32(data.Rows[0]["GaragID"]); FirstName = data.Rows[0]["FirstNmae"].ToString(); LastName = data.Rows[0]["LastName"].ToString(); Email = data.Rows[0]["Email"].ToString(); UsarName = data.Rows[0]["UsarName"].ToString(); PhonNumber = data.Rows[0]["PhonNumber"].ToString(); Password = data.Rows[0]["Password"].ToString(); BirthDate = Convert.ToDateTime(data.Rows[0]["BirthDate"]); JoinDate = Convert.ToDateTime(data.Rows[0]["JOINING_DATE"]); }
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 EventsModel(int id, int i) { DataTable data = new sql_class().Where("GaragID", id.ToString()).Where("ShwoEvent", "true").Get("EventsModel"); GaragID = Convert.ToInt32(data.Rows[i]["GaragID"]); EventID = Convert.ToInt32(data.Rows[i]["EventID"]); Title = data.Rows[i]["Title"].ToString(); Description = data.Rows[i]["Description"].ToString(); start = Convert.ToDateTime(data.Rows[i]["StartDate"]); if (!String.IsNullOrEmpty(data.Rows[i]["EndDate"].ToString())) { end = Convert.ToDateTime(data.Rows[i]["EndDate"]); } ThemsColor = data.Rows[i]["ThemsColor"].ToString(); IsFullDay = Convert.ToBoolean(data.Rows[i]["IsFullDay"]); }
public bool AddItem() { var Dblist = new List <DbListAdapter>(); Dblist.Add(new DbListAdapter("CustomerID", this.CustomerID.ToString())); Dblist.Add(new DbListAdapter("GaragID", GaragID.ToString())); Dblist.Add(new DbListAdapter("ProductId", this.ProductId)); Dblist.Add(new DbListAdapter("Quantity", this.Quantity.ToString())); Dblist.Add(new DbListAdapter("ProductName", this.ProductName)); Dblist.Add(new DbListAdapter("productPrice", this.productPrice.ToString())); Dblist.Add(new DbListAdapter("productImage", this.productImage)); Dblist.Add(new DbListAdapter("teratmentID", this.teratmentID)); sql_class sql = new sql_class(); bool newItem = sql.Insert("CartModel", Dblist); return((newItem) ? true : false); }
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); }
//Add new part to partModel table public bool newPart() { sql_class sql = new sql_class(); var Dblist = new List <DbListAdapter>(); Dblist.Add(new DbListAdapter("ProdectGroup", this.ProdectGroup)); Dblist.Add(new DbListAdapter("PartNmae", this.PartNmae)); Dblist.Add(new DbListAdapter("Condition", this.Condition)); Dblist.Add(new DbListAdapter("QuantityAaliable", this.QuantityAaliable.ToString())); Dblist.Add(new DbListAdapter("UnitPricey", this.UnitPricey.ToString())); Dblist.Add(new DbListAdapter("ImageUrl", this.ImageUrl)); Dblist.Add(new DbListAdapter("GaragID", this.GaragID.ToString())); bool succses = sql.Insert("PartModel", Dblist); if (succses) { return(true); } else { return(false); } }
public static void InsertRestData(List <DbListAdapter> data) { sql_class sql = new sql_class(); sql.Insert("RestUserAdmin", data); }
public static DataTable All_City() { DataTable sql = new sql_class().Get("City", "CityID", "CityName"); return(sql); }
public static DataTable Customer_info(string ID) { DataTable data = new sql_class().Where("UsarName", ID).Get("Customer"); return(data); }