Exemplo n.º 1
0
        private void btnNewPO_Click(object sender, EventArgs e)
        {
            if (!User.UserInAction("New Work Order"))
            {
                return;
            }
            frmAddEditWorkOrder frm = new frmAddEditWorkOrder(null, MethodType.Add);

            frm.ShowDialog();
        }
Exemplo n.º 2
0
 private void btnEditPo_Click(object sender, EventArgs e)
 {
     if (!User.UserInAction("Edit Work Order"))
     {
         return;
     }
     if (WorkOrderGrid.GetFocusedRow() is WorkOrders item)
     {
         frmAddEditWorkOrder frm = new frmAddEditWorkOrder(item, MethodType.Edit);
         frm.ShowDialog();
     }
 }
Exemplo n.º 3
0
        private void WorkOrderGrid_DoubleClick(object sender, EventArgs e)
        {
            if (!User.UserInAction("Edit Work Order"))
            {
                return;
            }

            frmAddEditWorkOrder frm = new frmAddEditWorkOrder(null, MethodType.Add)
            {
            };

            frm.ShowDialog();
        }
Exemplo n.º 4
0
        private void btnNewPO_Click(object sender, EventArgs e)
        {
            if (!User.UserInAction("New Work Order"))
            {
                return;
            }
            frmAddEditWorkOrder frm = new frmAddEditWorkOrder(null, MethodType.Add);
            frmAddEditWorkOrder res = frm.ShowDialogResult() as frmAddEditWorkOrder;

            Init();
            var rowHandle = this.WorkOrderGrid.LocateByValue("Id", res.workOrders.Id);

            WorkOrderGrid.FocusedRowHandle = rowHandle;
            WorkOrderGrid.MakeRowVisible(rowHandle);
        }
Exemplo n.º 5
0
        /*
         * 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);
         *  }
         *
         */
        private void btnEditPo_Click(object sender, EventArgs e)
        {
            if (!User.UserInAction("Edit Work Order"))
            {
                return;
            }
            if (WorkOrderGrid.GetFocusedRow() is WorkOrders item)
            {
                this.rowHandle = WorkOrderGrid.FocusedRowHandle;
                frmAddEditWorkOrder frm = new frmAddEditWorkOrder(item, MethodType.Edit);
                frm.ShowDialog();

                Details(item);
                Init();
                WorkOrderGrid.FocusedRowHandle = rowHandle;
                WorkOrderGrid.SelectRow(rowHandle);
                WorkOrderGrid.MakeRowVisible(rowHandle);
            }
        }