Exemplo n.º 1
0
        private void catchData()
        {
            this.data = new Dictionary <object, dynamic>();
            LogController controller = new LogController();
            LogList       control    = new LogList();

            this.data["startDate"] = startDateLog.Value;
            this.data["endDate"]   = endDateLog.Value;
            this.data["userId"]    = userIdLog.SelectedValue;

            controller.data = this.data;
            Dictionary <Object, dynamic> result = controller.getLogs();

            if (result["code"] == Result.Failed)
            {
                MessageBox.Show(result["msg"]);
            }

            if (result["code"] == Result.Processed)
            {
                control.loadDataGrid(result["content"]);
                Parent.Controls.Add(control);
            }
        }