Esempio n. 1
0
        public bool AddNewOrderDetails(OrderDetails orderDetails)
        {
            int id = Convert.ToInt32(Functions.IDGeneration(MyShopConfigration.OrderDetails)) + 1;

            SysRegedit.SaveReg(MyShopConfigration.OrderDetails, id.ToString() + "." + orderDetails.Id, "Id", id.ToString());
            SysRegedit.SaveReg(MyShopConfigration.OrderDetails, id.ToString() + "." + orderDetails.Id, "OrderId", OrderId.ToString());
            SysRegedit.SaveReg(MyShopConfigration.OrderDetails, id.ToString() + "." + orderDetails.Id, "ProductId", ProductId.ToString());
            SysRegedit.SaveReg(MyShopConfigration.OrderDetails, id.ToString() + "." + orderDetails.Id, "Quntity", Quntity.ToString());
            SysRegedit.SaveReg(MyShopConfigration.OrderDetails, id.ToString() + "." + orderDetails.Id, "Amount", Amount.ToString());
            return(true);
        }
        public bool AddNewProduct(Product product)
        {
            int id = Convert.ToInt32(Functions.IDGeneration(MyShopConfigration.Products)) + 1;

            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "Id", id.ToString());
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "Name", Name);
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "Price", Price.ToString());
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "ExpDate", ExpDate.ToString());
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "ManDate", ManDate.ToString());
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "CompanyName", CompanyName);
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "Quntity", Quntity.ToString());
            SysRegedit.SaveReg(MyShopConfigration.Products, id.ToString() + "." + product.Name, "Features", Features);
            return(true);
        }