public async Task <bool> AddProduct_Category(IProduct_Category product_Category)
        {
            var param = new
            {
                product_Category.UID,
                product_Category.CAT_Date,
                product_Category.CAT_Description,
                product_Category.CAT_Name
            };

            return(await _dataBaseManager.Add("SP_ADD_Product_Category", param));
        }
示例#2
0
        public async Task <bool> AddDesign(IDesign design)
        {
            var param = new
            {
                design.UID,
                design.Date,
                design.Description,
                design.Design_Title,
            };

            return(await _dataBaseManager.Add("SP_ADD_Design", param));
        }
        public void PutCharacteristic(string name, string value, int IdNote)
        {
            Characteristic character;

            try
            {
                character = _dataCharacter.GetBy("Name", name.ToString()).First();
            }
            catch (InvalidOperationException)
            {
                _dataCharacter.Add(new Characteristic()
                {
                    Name = name
                });

                character = _dataCharacter.GetBy("Name", name.ToString()).First();
            }

            _dataNoteCharacter.Add(new Note_Characteristic()
            {
                Id_Characteristic = character.Id_Characteristic,
                Id_Note           = IdNote,
                Value             = value
            });
        }
示例#4
0
        public void Put(string noteOrFile, int id)
        {
            string login = User.Identity.Name.ToString();

            if (noteOrFile == "note")
            {
                _dataNoteInfo.Add(new LikeNote()
                {
                    Id_Note = id,
                    Login   = login
                });
            }
            else if (noteOrFile == "file")
            {
                _dataFileInfo.Add(new LikeFile()
                {
                    Id_File = id,
                    Login   = login
                });
            }
            else
            {
                throw new ArgumentException("wrong description if likes");
            }
        }
        public async Task <bool> AddProduct_Command(IProduct_Command product_Command)
        {
            var param = new
            {
                product_Command.UID,
                product_Command.Date,
                product_Command.UID_Supplier
            };

            return(await _dataBaseManager.Add("SP_ADD_Product_Command", param));
        }
        public async Task <bool> AddProduct_Brand(IProduct_Brand product_Brand)
        {
            var param = new
            {
                product_Brand.UID,
                product_Brand.BRA_Name,
                product_Brand.BRA_Description,
                product_Brand.BRA_Date
            };

            return(await _dataBaseManager.Add("SP_ADD_Product_Brand", param));
        }
        public async Task <bool> AddOrder_Details(IOrder_Details order_Details)
        {
            var param = new
            {
                order_Details.UID,
                order_Details.Date,
                order_Details.UID_Customer,
                order_Details.UID_Design
            };

            return(await _dataBaseManager.Add("SP_ADD_Order_Details", param));
        }
示例#8
0
        public async Task <bool> AddService_Call(IService_Call service_Call)
        {
            var param = new
            {
                service_Call.UID,
                service_Call.Caller_Info,
                service_Call.Call_Description,
                service_Call.Date_time,
                service_Call.UID_Customer
            };

            return(await _dataBaseManager.Add("SP_ADD_Service_Call", param));
        }
示例#9
0
        public async Task <bool> AddFile(IFile file)
        {
            var param = new
            {
                file.UID,
                file.Date,
                file.FIL_UID_Origin,
                file.FIL_Name,
                file.FIL_Path
            };

            return(await _dataBaseManager.Add("SP_ADD_File", param));
        }
示例#10
0
        public async Task <bool> AddProduct_Stock(IProduct_Stock product_Stock)
        {
            var param = new
            {
                product_Stock.UID,
                product_Stock.Init_Qte,
                product_Stock.Status,
                product_Stock.Date,
                product_Stock.Product_UID
            };

            return(await _dataBaseManager.Add("SP_ADD_Product_Stock", param));
        }
示例#11
0
        public async Task <bool> AddColor(IColor color)
        {
            var param = new
            {
                color.UID,
                color.Color_Name,
                color.Hex,
                color.RGB,
                color.UID_Product
            };

            return(await _dataBaseManager.Add("SP_ADD_Color", param));
        }
        public async Task <bool> AddEmployee_Work_Detail(IEmployee_Work_Details employee_Work_Detail)
        {
            var param = new
            {
                employee_Work_Detail.UID,
                employee_Work_Detail.Date,
                employee_Work_Detail.Worked_hours,
                employee_Work_Detail.UID_Employee,
                employee_Work_Detail.UID_Project
            };

            return(await _dataBaseManager.Add("SP_ADD_Employee_Work_Details", param));
        }
        public async Task <bool> AddProduct_Command_Details(IProduct_Command_Details product_Command_Details)
        {
            var param = new
            {
                product_Command_Details.UID,
                product_Command_Details.PRO_Qte,
                product_Command_Details.Total_Price,
                product_Command_Details.UID_PRO,
                product_Command_Details.UID_PRO_Command,
            };

            return(await _dataBaseManager.Add("SP_ADD_Product_Command_Details", param));
        }
示例#14
0
        public async Task <bool> AddUsed_Products_Details(IUsed_Products_Details used_Products_Details)
        {
            var param = new
            {
                used_Products_Details.UID,
                used_Products_Details.Date,
                used_Products_Details.Damaged_numb,
                used_Products_Details.Qte,
                used_Products_Details.UID_PRO,
                used_Products_Details.UID_Project
            };

            return(await _dataBaseManager.Add("SP_ADD_Used_Products_Details", param));
        }
示例#15
0
        public async Task <bool> AddSupplier(ISupplier supplier)
        {
            var param = new
            {
                supplier.UID,
                supplier.SUP_Contact_Name,
                supplier.SUP_Email,
                supplier.SUP_Name,
                supplier.SUP_Phone,
                supplier.SUP_Type,
                supplier.SUP_URL,
                supplier.UID_Address
            };

            return(await _dataBaseManager.Add("SP_ADD_Supplier", param));
        }
示例#16
0
        public async Task <bool> AddAddress(IAddress InsertedAddress)
        {
            var param = new
            {
                InsertedAddress.UID,
                InsertedAddress.ADR_City,
                InsertedAddress.ADR_Country,
                InsertedAddress.ADR_Number,
                InsertedAddress.ADR_Postal_Code,
                InsertedAddress.ADR_State,
                InsertedAddress.ADR_Street,
                InsertedAddress.ADR_Suite
            };

            return(await _dataBaseManager.Add("SP_ADD_Address", param));
        }
示例#17
0
        public Task <bool> AddCompany(ICompany company)
        {
            var param = new
            {
                company.UID,
                company.COM_GCR,
                company.COM_Name,
                company.COM_NEQ,
                company.COM_RBQ,
                company.COM_TPS,
                company.COM_TVQ,
                company.UID_Address
            };

            return(_dataBaseManager.Add("SP_ADD_Company", param));
        }
示例#18
0
        public async Task <bool> AddProject(IProject project)
        {
            var param = new
            {
                project.UID,
                project.Cost,
                project.Finished_Date,
                project.Start_Date,
                project.Status,
                project.Project_Title,
                project.Progression,
                project.UID_Property,
                project.Canceled_or_stoped_cause
            };

            return(await _dataBaseManager.Add("SP_ADD_Project", param));
        }
        public async Task <bool> AddProduct_Composition(IProduct_Composition product_Composition)
        {
            var param = new
            {
                product_Composition.UID,
                product_Composition.PDTC_Description,
                product_Composition.PDTC_Extended_Cost,
                product_Composition.PDTC_Libelle,
                product_Composition.PDTC_Price,
                product_Composition.PDTC_Quantity,
                product_Composition.PDTC_Unite,
                product_Composition.PDTC_Unit_Cost,
                product_Composition.PDTC_UID_Compose,
                product_Composition.PDTC_UID_Composant
            };

            return(await _dataBaseManager.Add("SP_ADD_Product_Composition", param));
        }
示例#20
0
        public async Task <bool> AddProperty(IProperty property)
        {
            var param = new
            {
                property.UID,
                property.Construction_Date,
                property.Description,
                property.Parts_To_Build,
                property.PRO_Lot_Number,
                property.PRO_Name,
                property.PRO_UID_Customer,
                property.PRO_UID_Type,
                property.Size,
                property.Size_Unit,
                property.UID_Address
            };

            return(await _dataBaseManager.Add("SP_ADD_Property", param));
        }
示例#21
0
        public async Task <bool> AddProduct(IProduct product)
        {
            var param = new
            {
                product.UID,
                product.PDTC_Unite,
                product.PRO_Description,
                product.PRO_Enable_Retail_Sales,
                product.PRO_Model_Number,
                product.PRO_Name,
                product.PRO_Price,
                product.PRO_Retail_Price,
                product.PRO_Retail_Tax,
                product.PRO_Special_Price,
                product.PRO_Supply_Price,
                product.PRO_Type,
                product.PRO_UID_Brand,
                product.PRO_UID_Category,
                product.PRO_Video_URL
            };

            return(await _dataBaseManager.Add("SP_ADD_Product", param));
        }
示例#22
0
        protected void OnAddbuttonClicked(object sender, System.EventArgs e)
        {
            IDatabase db;
            string    dbname = MessagesHelpers.QueryMessage(this, Catalog.GetString("Database name"));

            if (dbname == null || dbname == "")
            {
                return;
            }

            if (manager.Databases.Where(d => d.Name == dbname).Count() != 0)
            {
                var msg = Catalog.GetString("A database already exists with this name");
                MessagesHelpers.ErrorMessage(this, msg);
                return;
            }

            db = manager.Add(dbname);
            if (db != null)
            {
                store.AppendValues(db);
            }
        }
示例#23
0
        public async Task <bool> AddCustomer(ICustomer customer)
        {
            var param = new
            {
                customer.UID,
                CUS_First_Name       = customer.USR_First_Name,
                CUS_Last_Name        = customer.USR_Last_Name,
                CUS_Hashed_Password  = customer.USR_Hashed_Password,
                CUS_Salt             = customer.USR_Salt,
                CUS_Email            = customer.USR_Email,
                CUS_Created_DateTime = customer.USR_Create_Date,
                CUS_Birth_Day        = customer.USR_BirthDay,
                CUS_Mobile           = customer.USR_Phone_Mobile,
                CUS_Username         = customer.USR_Username,
                customer.UID_Address,
                customer.CUS_Spouse_First_Name,
                customer.CUS_Spouse_Last_Name,
                customer.CUS_Phone,
                customer.CUS_Notes,
                customer.CUS_Notes_2,
            };

            return(await _dataBaseManager.Add("SP_ADD_Customer", param));
        }
示例#24
0
        public async Task <bool> AddEmployee(IEmployee employee)
        {
            var param = new
            {
                employee.UID,
                employee.UID_Address,
                employee.EMP_Employee_Number,
                employee.EMP_Employee_Service,
                employee.EMP_Extension_Number,
                employee.EMP_Last_Login_Date,
                employee.EMP_Phone,
                EMP_BirthDay        = employee.USR_BirthDay,
                EMP_Create_Date     = employee.USR_Create_Date,
                EMP_Email           = employee.USR_Email,
                EMP_First_Name      = employee.USR_First_Name,
                EMP_Hashed_Password = employee.USR_Hashed_Password,
                EMP_Last_Name       = employee.USR_Last_Name,
                EMP_Phone_Mobile    = employee.USR_Phone_Mobile,
                EMP_Salt            = employee.USR_Salt,
                EMP_Username        = employee.USR_Username
            };

            return(await _dataBaseManager.Add("SP_ADD_Employee", param));
        }