Ejemplo n.º 1
0
        protected virtual void LoadCategoriesDetailsExpenses()
        {
            if (WRCategories_DGW.CurrentRow == null)
            {
                _categories_detail_expenses = null;
            }
            else
            {
                PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this);
                try
                {
                    WorkReportResourceInfo category = WRCategories_DGW.CurrentRow.DataBoundItem as WorkReportResourceInfo;

                    _categories_detail_expenses      = WorkReportResourceList.GetByCategoryAndResourceList(category.OidCategory, EntityInfo.Relations.ToChildsOidList(), true, false);
                    WRCategoriesDetail_BS.DataSource = _categories_detail_expenses;
                    PgMng.Grow(string.Empty);
                }
                finally
                {
                    _categories_detail_expenses = null;

                    PgMng.FillUp();
                }
            }
        }
Ejemplo n.º 2
0
        protected virtual void LoadWorkReports(bool reload = false)
        {
            if (WorkReportMonth_DGW.CurrentRow == null)
            {
                _work_reports            = null;
                WorkReport_BS.DataSource = _work_reports;
            }
            else if (_work_reports == null || reload)
            {
                try
                {
                    PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this);

                    WorkReportResourceInfo work_report_month = WorkReportMonth_DGW.CurrentRow.DataBoundItem as WorkReportResourceInfo;

                    _work_reports            = WorkReportResourceList.GetByEmployeeList(EntityInfo.Oid, work_report_month.From.Year, work_report_month.From.Month, false, false);
                    WorkReport_BS.DataSource = _work_reports;
                    PgMng.Grow();
                }
                finally
                {
                    PgMng.FillUp();
                }
            }
        }
Ejemplo n.º 3
0
        protected override void EditWorkDeliveryAction()
        {
            if (WRDeliveries_BS.Current == null)
            {
                return;
            }

            WorkReportResourceInfo item = WRDeliveries_BS.Current as WorkReportResourceInfo;

            DeliveryEditForm form = new DeliveryEditForm(item.OidResource, ETipoEntidad.WorkReport, this);

            form.ShowDialog();
        }
Ejemplo n.º 4
0
        protected override void EditToolAction()
        {
            if (WRTools_BS.Current == null)
            {
                return;
            }

            WorkReportResourceInfo item = WRTools_BS.Current as WorkReportResourceInfo;

            ToolEditForm form = new ToolEditForm(item.OidResource, this);

            form.ShowDialog();
        }
Ejemplo n.º 5
0
        protected override void EditEmployeeAction()
        {
            if (WRStaff_BS.Current == null)
            {
                return;
            }

            WorkReportResourceInfo item = WRStaff_BS.Current as WorkReportResourceInfo;

            EmployeeEditForm form = new EmployeeEditForm(item.OidResource, this);

            form.ShowDialog();
        }
        protected override void EditWorkReportAction()
        {
            if (!ControlsMng.IsCurrentItemValid(WorkReport_DGW))
            {
                return;
            }

            WorkReportResourceInfo item = ControlsMng.GetCurrentItem(WorkReport_DGW) as WorkReportResourceInfo;

            WorkReportEditForm form = new WorkReportEditForm(item.OidWorkReport, this);

            form.ShowDialog(this);

            if (form.ActionResult == DialogResult.OK)
            {
                LoadWorkReports(true);
            }
        }
Ejemplo n.º 7
0
        protected virtual void PrintWorkReportListAction()
        {
            if (!ControlsMng.IsCurrentItemValid(WorkReportMonth_DGW))
            {
                return;
            }
            WorkReportResourceInfo item = ControlsMng.GetCurrentItem(WorkReportMonth_DGW) as WorkReportResourceInfo;

            PgMng.Reset(2, 1, Face.Resources.Messages.LOADING_DATA, this);

            string title  = Resources.Labels.EMPLOYEE_WORKREPORTS_LIST;
            string filter = Resources.Labels.EMPLOYEE + " = " + item.Resource + "; " + Resources.Labels.YEAR + " = " + item.Year + "; " + Resources.Labels.MONTH + " = " + item.Month;

            WorkReportReportMng rptMng = new WorkReportReportMng(AppContext.ActiveSchema, title, filter);

            ReportClass report = rptMng.GetWorkReportResourceList(WorkReportResourceList.GetList(WorkReport_BS.DataSource as IList <WorkReportResourceInfo>));

            PgMng.FillUp();

            ShowReport(report);
        }
Ejemplo n.º 8
0
        protected override void EditWorkReportAction()
        {
            if (WorkReport_DGW.CurrentRow == null)
            {
                return;
            }
            if (WorkReport_DGW.CurrentRow.Index < 0)
            {
                return;
            }
            if (WorkReport_DGW.CurrentRow.DataBoundItem == null)
            {
                return;
            }

            WorkReportResourceInfo item = (WorkReportResourceInfo)WorkReport_DGW.CurrentRow.DataBoundItem;

            WorkReportViewForm form = new WorkReportViewForm(item.OidWorkReport, this);

            form.ShowDialog(this);
        }