Esempio n. 1
0
 public RetiroDeLibro()
 {
     this.BackgroundImage       = Properties.Resources.Libros;
     this.BackgroundImageLayout = ImageLayout.Stretch;
     this.SetStyle(
         ControlStyles.AllPaintingInWmPaint |
         ControlStyles.DoubleBuffer,
         true);
     InitializeComponent();
     Form2_Load();
     Form1_Load();
     FormGrid();
     auxSearcher = new ProductSearchModel
     {
     };
     aux = new UserDataMin
     {
         Nombre      = "",
         PrecioPeso  = 0,
         PrecioDolar = 0,
         Cantidad    = 0,
     };
     aux2 = new UserDataMin
     {
         Nombre      = "",
         PrecioPeso  = 0,
         PrecioDolar = 0,
         Cantidad    = 0,
     };
     coleccion = new List <UserDataMin>();
 }
Esempio n. 2
0
        private void descuentaLibro(UserDataMin aux)
        {
            var client     = new MongoClient(Global.Path_DataBase);
            var database   = client.GetDatabase("app_libro");
            var collection = database.GetCollection <BsonDocument>("Stock");
            var builder    = Builders <BsonDocument> .Filter;
            var filter     = builder.Eq("Nombre", textBox3.Text) & builder.Eq("ISBN", textBox6.Text);
            var update     = Builders <BsonDocument> .Update.Inc("Cantidad", (-aux.Cantidad));

            var result = collection.UpdateOne(filter, update);
        }
Esempio n. 3
0
        private string getDire()
        {
            string aux        = string.Empty;
            var    client     = new MongoClient(Global.Path_DataBase);
            var    database   = client.GetDatabase("app_pago");
            var    collection = database.GetCollection <BsonDocument>("destinos");
            //var filter = Builders<BsonDocument>.Filter.Empty;
            var builder = Builders <BsonDocument> .Filter;
            var filter  = builder.Eq("Nombre", "Excels");
            var result  = collection.Find(filter).ToList();

            foreach (var doc in result)
            {
                aux = (doc.GetValue("Carpeta", new BsonString(string.Empty)).AsString);
            }
            return(aux);
        }
Esempio n. 4
0
        private void button5_Click(object sender, EventArgs e)
        {
            UserDataMin aux2 = new UserDataMin();

            if (checkBox3.Checked)
            {
                aux2.Nombre      = aux.Nombre;
                aux2.PrecioPeso  = aux.PrecioPeso;
                aux2.PrecioDolar = 0;
                aux2.Cantidad    = Convert.ToInt32(numericUpDown3.Value);
            }
            else
            {
                aux2.Nombre      = aux.Nombre;
                aux2.PrecioPeso  = 0;
                aux2.PrecioDolar = aux.PrecioDolar;
                aux2.Cantidad    = Convert.ToInt32(numericUpDown3.Value);
            }
            coleccion.Add(aux2);
            listView2.Clear();
            FormGrid();
            CargarDeposito(coleccion);
        }
Esempio n. 5
0
 public MyOwnListViewItem(UserDataMin userData)
 {
     this.userData = userData;
     Update();
 }