Exemplo n.º 1
0
        private void btnEditPo_Click(object sender, EventArgs e)
        {
            if (!User.UserInAction("Edit Tech Spec"))
            {
                return;
            }
            if (UcTechSpecGrid.GridView.GetFocusedRow() is TechSpecs item)
            {
                this.oldData        = item;
                this.oldSelectedRow = UcTechSpecGrid.GridView.FocusedRowHandle;
                frmAddEditTechSpecs frm = new frmAddEditTechSpecs()
                {
                    frmTechSpecs = this,
                    TechSpecsId  = Convert.ToInt32((UcTechSpecGrid.GridView.GetFocusedRow() as TechSpecs)?.Id),
                    MethodType   = MethodType.Edit
                };
                frm.ShowDialog();
                UcTechSpecGrid.CreateUcControl();

                TechSpecDetails.Details(item);
                lblPODescription.Text = item.TechSpecsId;
                ucTSEquipmentProfiles1.Details(item.Id, "TechSpecs");
                UcTechSpecGrid.GridView.SelectRow(this.oldSelectedRow);
                UcTechSpecGrid.GridView.FocusedRowHandle = this.oldSelectedRow;
                UcTechSpecGrid.GridView.MakeRowVisible(oldSelectedRow);
            }
        }
Exemplo n.º 2
0
        public void NewTS(WorkOrders workOrders)
        {
            frmAddEditTechSpecs frm = new frmAddEditTechSpecs(workOrders)
            {
                MethodType   = MethodType.Add,
                frmTechSpecs = this
            };

            frm.ShowDialog();
            UcTechSpecGrid.CreateUcControl();
            if (UcTechSpecGrid.GridView.GetFocusedRow() is TechSpecs item)
            {
                TechSpecDetails.Details(item);
                lblPODescription.Text = item.TechSpecsId;
                ucTSEquipmentProfiles1.Details(item.Id, "TechSpecs");
            }
        }