示例#1
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;
 }
示例#2
0
        public void SubmitJob(string job, string parameters)
        {
            try
            {
                lmDatasets.appDB.BatchRow br = (lmDatasets.appDB.BatchRow)Add(null);
                br.JobName    = job;
                br.Parameters = parameters;

                BusinessProcess bp = myA.GetBP();
                bp.AddForUpdate(this);
                bp.Update();
            }
            catch (Exception x)
            {
                myBatchDT.RejectChanges();
                throw x;
            }
        }
示例#3
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();
        }
示例#4
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);
            }
        }
示例#5
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));
 }