Ejemplo n.º 1
0
        private void panelControl3_Click(object sender, EventArgs e)
        {
            var itemFinder = new RentalItemFinder();
            itemFinder.ShowDialog();
            if (itemFinder.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                var item = itemFinder.Tag as RentalItemDto;
                if (item != null)
                {

                }
            }
        }
Ejemplo n.º 2
0
        private void RepResourceCodeButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            var tmpResource = viewResources.GetFocusedRow() as ResourceDto;
            if (tmpResource != null && tmpResource.ResourceType.Name == "PRODUCTO")
            {
                var itemFinder = new ItemFinder();
                if (itemFinder.ShowDialog() == DialogResult.OK)
                {
                    var itemDto = itemFinder.Tag as ItemDto;
                    LoadItem(itemDto);
                }
            }

            if (tmpResource != null && tmpResource.ResourceType.Name == "ALQUILERES")
            {
                var employeeFinder = new RentalItemFinder();
                if (employeeFinder.ShowDialog() == DialogResult.OK)
                {
                    var rentalItemDto = employeeFinder.Tag as RentalItemDto;
                    LoadRentalItem(rentalItemDto);
                }
            }

            if (tmpResource != null && tmpResource.ResourceType.Name == "PLANILLA")
            {
                //var employeeFinder = new EmployeeFinder();
                //if (employeeFinder.ShowDialog() == DialogResult.OK)
                //{
                //    var employeeDto = employeeFinder.Tag as EmployeeDto;
                //    LoadEmployee(employeeDto);
                //}
                var postFinder = new PostFinder();
                if (postFinder.ShowDialog() == DialogResult.OK)
                {
                    var postDto = postFinder.Tag as PostDto;
                    LoadPost(postDto);
                }
            }
        }