コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public static void Add(string request)
 {
     Shared.SQLDatabaseConnetion connection = new Shared.SQLDatabaseConnetion();
     connection.Insert(request);
 }
コード例 #5
0
 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));
 }
コード例 #6
0
 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));
 }
コード例 #7
0
 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));
 }