예제 #1
0
        private void btnSaveLocal_Click(object sender, EventArgs e)
        {
            if (!filledValues())
            {
                //MessageBox.Show("Complete la información");
            }
            else
            {
                premises l = new premises();

                //p.brand = brands[cboBrand.SelectedIndex];
                l.description = txtNombre.Text;
                //p.discount = discounts[cboDiscount.SelectedIndex];
                l.address = txtAddress.Text;
                //p.SKUcode = txtSKUCode.Text;
                //p.name = txtName.Text;
                //p.productDescription = txtDescription.Text;
                //p.productCareDescription = txtCareDescription.Text;
                l.state = 1;
                //p.salePrice = float.Parse(txtSalePrice.Text);
                //p.purchasePrice = float.Parse(txtPurchasePrice.Text);
                //p.igv = float.Parse(txtIGV.Text);
                //p.stock = int.Parse(txtStock.Text);
                l.creationDate     = DateTime.Today;
                l.modificationDate = DateTime.Today;

                serviceDA      = new DBControllerWSClient();
                Cursor.Current = Cursors.WaitCursor;
                serviceDA.insertPremises(l);
                Cursor.Current = Cursors.Arrow;
                MessageBox.Show("El local se guardó satisfactoriamente");
                this.Close();
            }
            //MessageBox.Show("Se ha agregado un nuevo local satisfactoriamente");
            //this.Close();
        }