protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
            Button btnUser        = FindViewById <Button>(Resource.Id.btnUser);
            Button btnTable       = FindViewById <Button>(Resource.Id.btnTable);
            Button btnGraph       = FindViewById <Button>(Resource.Id.btnGraph);
            Button btnField       = FindViewById <Button>(Resource.Id.btnField);
            Button btnCustomField = FindViewById <Button>(Resource.Id.btnCustomField);
            Button btnReset       = FindViewById <Button>(Resource.Id.btnReset);
            Button btnAdd         = FindViewById <Button>(Resource.Id.btnAdd);

            btnUser.Click        += BtnUser_Click;
            btnTable.Click       += BtnTable_Click;
            btnGraph.Click       += BtnGraph_Click;
            btnField.Click       += BtnField_Click;
            btnCustomField.Click += BtnCustomField_Click;
            btnReset.Click       += BtnReset_Click;
            btnAdd.Click         += BtnAdd_Click;

            userTabledb      = new UserTableDB(this);
            tableListdb      = new TableListDB(this);
            graphTabledb     = new GraphTableDB(this);
            fieldTable       = new FieldTableDB(this);
            customFieldTable = new CustomFieldTableDB(this);

            userTabledb.CreateTable();
            tableListdb.CreateTable();
            graphTabledb.CreateTable();
            fieldTable.CreateTable();
            customFieldTable.CreateTable();
        }
 public DatabaseFunction(Context context)
 {
     UserTable        = new UserTableDB(context);
     CustomFieldTable = new CustomFieldTableDB(context);
     FieldTable       = new FieldTableDB(context);
     GraphTable       = new GraphTableDB(context);
     TableList        = new TableListDB(context);
 }
Beispiel #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);
            FontFunction font = new FontFunction();
            UserTableDB  User = new UserTableDB(this);

            CheckIfDBExist();
            NextPage(User.Count() == 0);
        }
Beispiel #4
0
        /// <summary>
        /// Initialises UserDataTable
        /// Pulls Data from the database and generates columns and rows to match the said data
        /// and inputs that dta afterwards
        /// </summary>
        /// <param name="context">Allows it to know which activity it is calling it from</param>
        /// <param name="Name">Used to Determine which spreadsheet is to be openned</param>
        public UserDataTable(Context context, String Name) : base(Name)
        {
            UserTableDB userTabledb = new UserTableDB(context);

            string userName = "******";
            string passWord = "******";

            var dataColumns = new Dictionary <string, float>();

            dataColumns.Add("  " + userName, 150);
            dataColumns.Add(passWord, 150);

            foreach (var key in dataColumns.Keys)
            {
                var dc = new DSDataColumn(key);
                dc.Caption   = key;
                dc.ReadOnly  = true;
                dc.DataType  = typeof(string);
                dc.AllowSort = true;
                dc.Width     = dataColumns[key];
                Columns.Add(dc);
            }

            List <string> UserNameList = userTabledb.readString(userName);
            List <string> PassWordList = userTabledb.readString(passWord);
            int           row          = userTabledb.Count();

            for (int i = 0; i < row; i += 1)
            {
                var dataRows = new DSDataRow();

                dataRows["  " + userName] = "  " + UserNameList[i];
                dataRows[passWord]        = PassWordList[i];

                Rows.Add(dataRows);
            }
        }
Beispiel #5
0
 public UserTableCtrl()
 {
     uDb = new UserTableDB();
 }