Ejemplo n.º 1
0
            public override global::System.Data.DataTable Clone()
            {
                PresupuestoDataTable cln = ((PresupuestoDataTable)(base.Clone()));

                cln.InitVars();
                return(cln);
            }
Ejemplo n.º 2
0
        //--------------------------------------------------------------------------------------------------------------------------------------
        public bool Load()
        {
            Configuration();

            BD                         = new DataBase();
            BD.DataSetName             = "DataBase";
            BD.SchemaSerializationMode = SchemaSerializationMode.IncludeSchema;

            try
            {
                BD.ReadXml(DBFile);

                tablePresupesto = BD.Presupuesto;
                tableGastos     = BD.Gastos;
                tableCompras    = BD.Compras;
                tableVentas     = BD.Ventas;
                tablePagos      = BD.Pagos;

                UpdateEstadisticas();
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Ejemplo n.º 3
0
 private void InitClass()
 {
     this.DataSetName             = "dsPresupuesto";
     this.Prefix                  = "";
     this.Namespace               = "http://www.tempuri.org/dsPresupuesto.xsd";
     this.Locale                  = new global::System.Globalization.CultureInfo("es-MX");
     this.EnforceConstraints      = true;
     this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
     this.tablePresupuesto        = new PresupuestoDataTable();
     base.Tables.Add(this.tablePresupuesto);
 }
Ejemplo n.º 4
0
 internal void InitVars(bool initTable)
 {
     this.tablePresupuesto = ((PresupuestoDataTable)(base.Tables["Presupuesto"]));
     if ((initTable == true))
     {
         if ((this.tablePresupuesto != null))
         {
             this.tablePresupuesto.InitVars();
         }
     }
 }
Ejemplo n.º 5
0
        //--------------------------------------------------------------------------------------------------------------------------------------
        /// <summary></summary>
        private void ctlPresupuesto_Load(object sender, EventArgs e)
        {
            if (Datos.BD == null)
            {
                return;
            }

            table = Datos.tablePresupesto;

            frm = (frmUnViaje)Parent.Parent.Parent;

            cbMoneda.SelectedIndex = 0;

            tbPresup = CreateTablePresup();
            Grid.AutoGenerateColumns = false;
            Grid.DataSource          = tbPresup;

            FillGrid();
        }
Ejemplo n.º 6
0
    //--------------------------------------------------------------------------------------------------------------------------------------
    /// <summary>Carga la base de datos e inicializa todas las tablas</summary>
    internal static void LoadDataBase()
      {
      BD = new DBViaje(); 
      BD.DataSetName = "DataBase";
      BD.SchemaSerializationMode = SchemaSerializationMode.IncludeSchema;

      if( File.Exists(DatosFile) )
        BD.ReadXml(DatosFile);

      tablePresupesto = BD.Presupuesto;
      tableGastos     = BD.Gastos;
      tableCompras    = BD.Compras;
      tableVentas     = BD.Ventas;
      tablePagos      = BD.Pagos;

      GetPresupuesto();
      GetGastos();
      GetCompras();
      }
Ejemplo n.º 7
0
 internal PresupuestoRow(global::System.Data.DataRowBuilder rb) :
     base(rb)
 {
     this.tablePresupuesto = ((PresupuestoDataTable)(this.Table));
 }