Ejemplo n.º 1
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "tsReload":
                    AtMng.DB.Batch.Clear();
                    AtMng.GetBatch().LoadByOfficeCode(AtMng.OfficeLoggedOn.OfficeCode);
                    batchGridEX.Row = 0;
                    break;

                case "tsMarkAsRead":

                    CurrentRow().Status = "R";
                    Save();

                    break;

                case "tsAudit":
                    fData fAudit = new fData(CurrentRow());
                    fAudit.Show();
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Ejemplo n.º 2
0
 private void AddBatchJob(DateTime RunAfterDate, string JobParams)
 {
     lmDatasets.appDB.BatchRow br = (lmDatasets.appDB.BatchRow)AtMng.GetBatch().Add(null);
     br.JobName      = "RunSQL";
     br.RunAfterDate = RunAfterDate;
     br.Parameters   = JobParams;
 }
Ejemplo n.º 3
0
 public fBatchReview(Form f) : base(f)
 {
     InitializeComponent();
     AtMng.GetBatch().LoadByOfficeCode(AtMng.OfficeLoggedOn.OfficeCode);
     BindBatchData(AtMng.DB.Batch);
     batchGridEX.MoveFirst();
 }
Ejemplo n.º 4
0
 private void fBatch_Load(object sender, EventArgs e)
 {
     try
     {
         AtMng.GetBatch().Load();
         batchGridEX.RootTable.SortKeys.Add(batchGridEX.RootTable.Columns["BatchDate"], Janus.Windows.GridEX.SortOrder.Descending);
         batchGridEX.MoveFirst();
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Ejemplo n.º 5
0
 private void Delete()
 {
     try
     {
         if (MessageBox.Show("Are you sure you want to delete this Batch Review record?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
         {
             CurrentRow().Delete();
             batchBindingSource.EndEdit();
             atLogic.BusinessProcess bp = AtMng.GetBP();
             bp.AddForUpdate(AtMng.GetBatch());
             bp.Update();
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Ejemplo n.º 6
0
        public void CreateBatchRecord(List <DataRow> rowList)
        {
            foreach (DataRow dr in rowList)
            {
                MemberManagement.TribunalMemberAssignmentRow tmar = (MemberManagement.TribunalMemberAssignmentRow)dr;
                if (!tmar.IsTentativeMemberIdNull())
                {
                    tmar.ReadyToAssignDate = DateTime.Now;

                    lmDatasets.appDB.BatchRow br = (lmDatasets.appDB.BatchRow)AtMng.GetBatch().Add(null);
                    br.JobName    = "CreateAC";
                    br.Parameters = String.Format("{0},{1},{2},{3},{4}", tmar.FileId, AtMng.GetSetting(AppIntSetting.AssignedVCAcId), DateTime.Today.ToString("yyyy-MM-dd"), "SSTDecision", tmar.SSTDecisionId);
                }
            }

            atLogic.BusinessProcess bp = AtMng.GetBP();
            bp.AddForUpdate(AtMng.GetBatch());
            bp.AddForUpdate(GetTribunalMemberAssignment());
            bp.Update();
        }
Ejemplo n.º 7
0
        private void Save()
        {
            if (AtMng.DB.Batch.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(AtMng.DB);
            }
            else
            {
                try
                {
                    batchBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.GetBatch());
                    bp.Update();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Ejemplo n.º 8
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "cmdNewSQL":
                    lmDatasets.appDB.BatchRow br = (lmDatasets.appDB.BatchRow)AtMng.GetBatch().Add(null);
                    br.JobName = "RunSQL";
                    parametersEditBox.ReadOnly = false;
                    break;

                case "cmdRun":

                    AtMng.GetBatch().RunAllJobs();
                    break;

                case "cmdSave":
                    Save();
                    parametersEditBox.ReadOnly = true;
                    break;

                case "cmdCancel":
                    Cancel();
                    parametersEditBox.ReadOnly = true;
                    break;

                case "cmdDelete":
                    Delete();
                    parametersEditBox.ReadOnly = true;
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Ejemplo n.º 9
0
        private void Save()
        {
            if (AtMng.DB.Batch.HasErrors)
            {
                MessageBox.Show("Cannot save while there are errors in the data.");
            }
            else
            {
                try
                {
                    batchGridEX.UpdateData();
                    batchBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.GetBatch());
                    bp.Update();
                }
                catch (Exception x)
                {
                    UIHelper.HandleUIException(x);
                }
            }
        }
Ejemplo n.º 10
0
 private void SaveBatchJob()
 {
     atLogic.BusinessProcess bp = AtMng.GetBP();
     bp.AddForUpdate(AtMng.GetBatch());
     bp.Update();
 }
Ejemplo n.º 11
0
 private void ApplySecurity(DataRow dr)
 {
     lmDatasets.appDB.BatchRow br = (lmDatasets.appDB.BatchRow)dr;
     UIHelper.EnableControls(batchBindingSource, AtMng.GetBatch().CanEdit(br));
     UIHelper.EnableCommandBarCommand(cmdDelete, AtMng.GetBatch().CanDelete(br));
 }