예제 #1
0
        private void lblControlNo_Click(object sender, EventArgs e)
        {
            if (DashboardGridView.GetFocusedRow() is DocumentActions documentActions)
            {
                if (documentActions.TableName == "Obligations")
                {
                    Main frm = Application.OpenForms["Main"] as Main;
                    frm.pnlMain.Controls.Clear();
                    var obr = new ucObligations()
                    {
                        Dock = DockStyle.Fill
                    };
                    obr.txtSearch.Text = documentActions.ControlNo;
                    frm.pnlMain.Controls.Add(obr);
                    obr.btnSearch.PerformClick();
                }
                else
                {
                    Main frm = Application.OpenForms["Main"] as Main;
                    frm.pnlMain.Controls.Clear();



                    var pr = new PR.UCPurchaseRequest(documentActions.ControlNo)
                    {
                        Dock = DockStyle.Fill
                    };
                    //pr.txtSearch.Text = documentActions.ControlNo;
                    pr.loadAddEditPurchaseRequest.Search(documentActions.ControlNo, true);
                    frm.pnlMain.Controls.Add(pr);
                    pr.btnSearch.PerformClick();
                }
            }
        }
예제 #2
0
 private async void DashboardGridView_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
 {
     if (DashboardGridView.GetFocusedRow() is DocumentActions item)
     {
         await Detail(item);
     }
 }
예제 #3
0
 private void btnTaskDone_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     if (DashboardGridView.GetFocusedRow() is DocumentActions item)
     {
         frmTaskDone frm = new frmTaskDone(item);
         frm.ShowDialog();
         Init();
     }
 }
예제 #4
0
 private void btnTaskDelete_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     if (DashboardGridView.GetFocusedRow() is DocumentActions item)
     {
         if (MessageBox.Show("Do you want to submit this?", "Submit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
         {
             return;
         }
         UnitOfWork unitOfWork = new UnitOfWork();
         item = unitOfWork.DocumentActionsRepo.Find(x => x.Id == item.Id, "RoutedToUsers");
         item.RoutedToUsers.Remove(unitOfWork.UsersRepo.Find(x => x.Id == User.UserId));
         unitOfWork.Save();
         Init();
     }
 }
예제 #5
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();
     }
 }
예제 #6
0
파일: UCHome.cs 프로젝트: dadotnetkid/OFMIS
 private void lblControlNo_Click(object sender, EventArgs e)
 {
     if (DashboardGridView.GetFocusedRow() is DocumentActions documentActions)
     {
     }
 }