public static void Delete(int id) { Shared.SQLDatabaseConnetion connection = new Shared.SQLDatabaseConnetion(); string request = String.Format(Shared.RequestConsts.Delete.Fitting.deleteByIdRequest, id); connection.Insert(request); }
public static Client Add(string fullName, string phoneNumber, string email) { Shared.SQLDatabaseConnetion connection = new Shared.SQLDatabaseConnetion(); string formattedPhoneNumber = phoneNumber.RemoveWhitespace(); string formattedEmail = email.RemoveWhitespace(); Client newClient = new Client(Services.IdBuilderService.GetRandomId(), fullName, phoneNumber, email); connection.Insert(String.Format(Shared.RequestConsts.Put.Independent.putClientRequest, newClient.id, fullName, formattedPhoneNumber, formattedEmail)); return(newClient); }
public static void Add(double bookingSum, int cutterId, int clientId, int modelId, int fabricId) { string issueDate = DateTime.Today.AddDays(7).ToString("MM/dd/yyyy"); Shared.SQLDatabaseConnetion connection = new Shared.SQLDatabaseConnetion(); string bookingInsertRequest = String.Format(Shared.RequestConsts.Put.Dependable.putBookingRequest, DateTime.Today.ToString("MM/dd/yyyy"), issueDate, new Mark(false).ToString(), bookingSum, cutterId, clientId, modelId, fabricId); connection.Insert(bookingInsertRequest); }
public static void Add(string request) { Shared.SQLDatabaseConnetion connection = new Shared.SQLDatabaseConnetion(); connection.Insert(request); }
public static void Add(Fabric fabric) { Shared.SQLDatabaseConnetion connection = new Shared.SQLDatabaseConnetion(); Independent.ManufacturerNetworkProxy.Add(fabric.manufacturer); connection.Insert(String.Format(Shared.RequestConsts.Put.Dependable.putFabricRequest, fabric.id, fabric.name, fabric.length, fabric.price, fabric.manufacturer.id, fabric.photoLink)); }
public static void Add(Networking.Independent.Model model, Networking.SingleDependable.Fabric fabric) { Shared.SQLDatabaseConnetion connection = new Shared.SQLDatabaseConnetion(); connection.Insert(String.Format(Networking.Shared.RequestConsts.Put.Dependable.putRecomendationRequest, model.id, fabric.id)); }
public static void Add(Manufacturer manufacturer) { Shared.SQLDatabaseConnetion connection = new Shared.SQLDatabaseConnetion(); connection.Insert(String.Format(Shared.RequestConsts.Put.Independent.putManufacturerRequest, manufacturer.id, manufacturer.firmName, manufacturer.country)); }