Example #1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            frmDocActions frm = new frmDocActions(MethodType.Add, new DocumentActions()
            {
                ControlNo = controlNo,
                TableName = this.tableName,
                RefId     = this.refId,
                ObR_PR_No = documentNo
            });

            frm.ShowDialog();
            Init();
        }
Example #2
0
 private void btnEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     if (DocActionGridView.GetFocusedRow() is DocumentActions item)
     {
         if (!User.CheckOwner(item.CreatedBy))
         {
             return;
         }
         frmDocActions frm = new frmDocActions(MethodType.Edit, item);
         frm.ShowDialog();
         Init();
     }
 }
Example #3
0
 private void btnAddAction_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     if (DashboardGridView.GetFocusedRow() is DocumentActions item)
     {
         frmDocActions frm = new frmDocActions(MethodType.Add, new DocumentActions()
         {
             TableName   = item.TableName,
             ActionDate  = DateTime.Now,
             RefId       = item.RefId,
             CreatedBy   = User.UserId,
             DateCreated = DateTime.Now,
             ControlNo   = item.ControlNo,
             Year        = item.Year
         });
         frm.ShowDialog();
         Init();
     }
 }