示例#1
0
        public override void Save()
        {
            if (FM.LeadOfficeMng.DB.Office.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.DB);
            }
            else
            {
                try
                {
                    this.officeBindingSource.EndEdit();
                    this.addressBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.LeadOfficeMng.GetOffice());
                    bp.AddForUpdate(FM.GetAddress());
                    bp.Update();



                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
示例#2
0
        private bool Save()
        {
            try
            {
                if (MessageBox.Show("All edits (to all records) will be saved.  Are you sure you want to proceed?", "Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    ucBFCode1.EndEdit();
                    aCBFBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.acMng.GetACBF());
                    bp.Update();


                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
                return(false);
            }
        }
示例#3
0
        public override void Save()
        {
            if (FM.DB.RiskAssessment.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.DB);
            }
            else
            {
                try
                {
                    this.riskAssessmentBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetRiskAssessment());
                    bp.AddForUpdate(FM.EFile);
                    bp.Update();


                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    UIHelper.HandleUIException(x);
                }
            }
        }
示例#4
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
                secUserBindingSource.EndEdit();

                secMembershipGridEX.UpdateData();
                secMembershipBindingSource.EndEdit();

                atLogic.BusinessProcess bp = mySM.GetBP();
                bp.AddForUpdate(mySM.GetsecUser());
                bp.AddForUpdate(mySM.GetsecMembership());


                if (sur.AuthType == 0)
                {
                    if (isNew || secUserExistsWithoutSQLAccount)
                    {
                        mySM.GetsecUser().CreateSQLAccount(sur, passwordEditBox.Text);
                    }
                    else
                    {
                        mySM.GetsecUser().ChangeSQLPassword(sur, passwordEditBox.Text);
                    }
                }
                bp.Update();
                myOr.UserName = sur.UserName;

                this.Close();
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
示例#5
0
        private void Delete()
        {
            try
            {
                if (MessageBox.Show("Your current selection will be deleted.  Are you sure you want to proceed?", "Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    int gridPos = activityCodeGridEX.CurrentRow.Position;
                    CurrentRow().Delete();
                    if (gridPos > activityCodeGridEX.RowCount)
                    {
                        activityCodeGridEX.Row = activityCodeGridEX.RowCount;
                    }
                    else
                    {
                        activityCodeGridEX.Row = gridPos;
                    }

                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.acMng.GetActivityCode());

                    bp.Update();
                }
                else
                {
                    return;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
                return;
            }
        }
示例#6
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                if (sur != null)
                {
                    string user     = sur.UserName;
                    int    authType = sur.AuthType;
                    sur.Delete();

                    //TODO: check trans
                    atLogic.BusinessProcess bp = mySM.GetBP();

                    //  bp.AddForUpdate(mySM.GetsecFileRule());
                    bp.AddForUpdate(mySM.GetsecMembership());
                    bp.AddForUpdate(mySM.GetsecUser());

                    if (authType == 0)
                    {
                        mySM.GetsecUser().DeleteSQLAccount(user);
                    }
                    bp.Update();
                    myOr.UserName = '******' + myOr.OfficerId.ToString();
                    this.Close();
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
示例#7
0
        public override void Delete()
        {
            try
            {
                if (UIHelper.ConfirmDelete())
                {
                    CurrentRow().Delete();
                    this.opinionBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetAdvisoryMng().GetOpinion());
                    bp.AddForUpdate(FM.EFile);
                    bp.Update();


                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
            }
            catch (Exception x)
            {
                throw x;
            }
        }
示例#8
0
        private void Save()
        {
            if (AtMng.DB.Legislation.HasErrors || AtMng.DB.Provision.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(AtMng.DB);
            }
            else
            {
                try
                {
                    SaveRtfValues();
                    legislationBindingSource.EndEdit();
                    provisionBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = AtMng.GetBP();

                    bp.AddForUpdate(AtMng.GetLegislation());
                    bp.AddForUpdate(AtMng.GetProvision());
                    bp.Update();

                    setEditMode(false);
                    SetRTFValues(false);
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
示例#9
0
        public override void Save()
        {
            if (FM.GetCLASMng().DB.CBDetail.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.GetCLASMng().DB);
            }
            else
            {
                try
                {
                    cBDetailBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetCLASMng().GetCBDetail());
                    //    bp.AddForUpdate(FM.EFile);
                    bp.Update();

                    ApplyBR(true);
                    ApplyRowBR();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
示例#10
0
        public override void Save()
        {
            if (FM.GetAdvisoryMng().DB.Opinion.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.DB);
            }
            else
            {
                try
                {
                    this.opinionBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetAdvisoryMng().GetOpinion());
                    bp.AddForUpdate(FM.GetDocMng().GetDocument());
                    bp.AddForUpdate(FM.GetDocMng().GetDocContent());
                    bp.AddForUpdate(FM.GetActivityBF());
                    bp.AddForUpdate(FM.EFile);
                    bp.Update();



                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
示例#11
0
        public override void Save()
        {
            if (sstMngr.DB.FileParty.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(sstMngr.DB);
            }
            else
            {
                try
                {
                    filePartyBindingSource.EndEdit();
                    partyBindingSource.EndEdit();
                    addressBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = FM.GetBP();

                    bp.AddForUpdate(FM.GetFileContact());
                    bp.AddForUpdate(FM.GetPerson());
                    bp.AddForUpdate(FM.GetAddress());
                    bp.AddForUpdate(FM.EFile);
                    bp.Update();



                    ApplyBR(true);
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
示例#12
0
        private void AddExtensionToFileFormatTable(string ext, docDB.FileFormatDataTable ffTable)
        {
            if (obe == null)
            {
                obe = AtMng.GetCodeTableBE("FileFormat");
                obe.Load();
            }

            CodesDB.FileFormatRow ffRow = (CodesDB.FileFormatRow)obe.Add(null);
            ffRow.AllowEdit    = false;
            ffRow.AllowPreview = false;
            ffRow.AllowSearch  = true;
            ffRow.AllowUpload  = true;
            ffRow.FileDescEng  = "Lotus Notes Import";
            ffRow.FileDescFre  = "Lotus Notes Import";
            ffRow.FileFormat   = ext;
            ffRow.IsBinary     = false;

            ffRow.EndEdit();
            atLogic.BusinessProcess bp = AtMng.GetBP();
            bp.AddForUpdate(obe);
            bp.Update();

            ffTable.ImportRow(ffRow);
        }
示例#13
0
        private int UploadFile()
        {
            try
            {
                if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    string f = this.openFileDialog1.FileName;

                    docDB.DocumentRow newDoc = (docDB.DocumentRow)FM.GetDocMng().GetDocument().Add(FM.CurrentFile, f);

                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetDocMng().GetDocContent());
                    bp.AddForUpdate(FM.GetDocMng().GetDocument());

                    bp.Update();

                    return(newDoc.DocId);
                }
                else
                {
                    return(0);
                }
            }
            catch (Exception x)
            {
                throw x;
            }
        }
示例#14
0
        public override void Delete()
        {
            try
            {
                if (UIHelper.ConfirmDelete())
                {
                    CurrentRow().Delete();
                    riskAssessmentBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetRiskAssessment());
                    bp.AddForUpdate(FM.EFile);
                    bp.Update();



                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
            }
            catch (Exception x)
            {
                throw x;
            }
        }
示例#15
0
        private void DeleteTimeSlip(appDB.TimeSlipRow actr)
        {
            if (UIHelper.ConfirmDelete())
            {
                atriumBE.FileManager FMActivityTime = FM.AtMng.GetFile(actr.FileId);
                FMActivityTime.GetActivity().Load(actr.ActivityId);
                atriumDB.ActivityTimeRow atr = FMActivityTime.GetActivityTime().Load(actr.ActivityTimeId);
                Application.UseWaitCursor = true;
                atr.Delete();
                actr.Delete();
                try
                {
                    atLogic.BusinessProcess bp = FMActivityTime.GetBP();
                    bp.AddForUpdate(FMActivityTime.GetActivityTime());

                    bp.Update();

                    if (CurrentRowSRP().IsSRPSubmittedDateNull())
                    {
                        CalculateOpenPeriodTotals(CurrentRowSRP());
                    }
                }
                catch (Exception x1)
                {
                    FMActivityTime.DB.ActivityTime.RejectChanges();
                    throw x1;
                }
                finally
                {
                    Application.UseWaitCursor = false;
                }
            }
        }
示例#16
0
        private void Save()
        {
            try
            {
                if (MessageBox.Show("All edits (to all records) will be saved.  Are you sure you want to proceed?", "Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                {
                    ddLookupGridEX.CurrentRow.EndEdit();
                    ddLookupGridEX.UpdateData();
                    ddLookupBindingSource.EndEdit();

                    if (ddGenericGridEX.CurrentRow != null)
                    {
                        ddGenericGridEX.CurrentRow.EndEdit();
                    }
                    ddGenericGridEX.UpdateData();
                    ddGenericBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = AtMng.GetBP();

                    bp.AddForUpdate(AtMng.GetddLookup());
                    bp.AddForUpdate(AtMng.GetddGeneric());
                    bp.Update();
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
示例#17
0
        public override void Save()
        {
            if (FM.GetCLASMng().DB.CompOffer.HasErrors || FM.GetCLASMng().DB.CompOfferDetail.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.GetCLASMng().DB);
            }
            else
            {
                try
                {
                    atriumDB_CompOfferDataTableBindingSource.EndEdit();
                    atriumDB_CompOfferDetailDataTableBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = FM.GetBP();

                    bp.AddForUpdate(FM.GetCLASMng().GetCompOffer());
                    bp.AddForUpdate(FM.GetCLASMng().GetCompOfferDetail());
                    bp.AddForUpdate(FM.EFile);

                    bp.Update();

                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
示例#18
0
        public override void Save()
        {
            if (FM.GetCLASMng().DB.Insolvency.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.GetCLASMng().DB);
            }
            else
            {
                try
                {
                    this.insolvencyBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetCLASMng().GetInsolvency());
                    bp.AddForUpdate(FM.EFile);
                    bp.Update();
                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
示例#19
0
        private void Delete()
        {
            try
            {
                if (UIHelper.ConfirmDelete())
                {
                    docDB.DocumentRow dr = AtMng.GetTemplate().GetTemplateDoc(CurrentRow());

                    CurrentRow().Delete();
                    if (dr != null)
                    {
                        dr.Delete();
                    }

                    this.templateBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.GetTemplate());
                    bp.AddForUpdate(myDM.GetDocContent());
                    bp.AddForUpdate(myDM.GetDocument());

                    bp.Update();
                }
            }
            catch (Exception x)
            {
                throw new Exception("Transaction Rolled Back", x);
            }
        }
示例#20
0
        private void btnDismissAll_Click(object sender, EventArgs e)
        {
            try
            {
                int attendeeId;
                if (UIHelper.ConfirmDeleteReminders())
                {
                    foreach (Janus.Windows.GridEX.GridEXRow gri in gridEXNotification.GetRows())
                    {
                        if (gri.RowType == Janus.Windows.GridEX.RowType.Record)
                        {
                            attendeeId = (int)gri.Cells["AttendeeId"].Value;
                            atriumDB.AttendeeRow attrow = currentFM.DB.Attendee.FindByAttendeeId(attendeeId);
                            if (!attrow.IsNotificationDismissNull())
                            {
                                attrow.BeginEdit();
                                attrow.NotificationDismiss = true;
                                attrow.Interval            = 0;
                                attrow.EndEdit();
                            }
                        }
                    }

                    atLogic.BusinessProcess bp = currentFM.GetBP();
                    bp.AddForUpdate(currentFM.DB.Attendee);
                    bp.Update();

                    this.Close();
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
示例#21
0
        private void Save()
        {
            if (AtMng.DB.Template.HasErrors || myDM.DB.Document.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(AtMng.DB);
            }
            else
            {
                try
                {
                    this.templateBindingSource.EndEdit();
                    ucDoc1.EndEdit();

                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.GetTemplate());
                    bp.AddForUpdate(myDM.GetDocContent());
                    bp.AddForUpdate(myDM.GetDocument());

                    bp.Update();


                    EditDocContents(false);
                    templateGridEX.Focus();
                    //causes currentchanged on binding source to fire - changing order
                    //Atmng.DB.Template.AcceptChanges();

                    //myDM.DB.Document.AcceptChanges();
                    //myDM.DB.DocContent.AcceptChanges();
                }
                catch (Exception x)
                {
                    throw new Exception("Transaction Rolled Back", x);
                }
            }
        }
示例#22
0
        private void Save()
        {
            if (AtMng.DB.Issue.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(AtMng.DB);
            }
            else
            {
                try
                {
                    string nodeKey = CurrentRow().IssueId.ToString();
                    SaveRtfValues();
                    this.issueBindingSource1.EndEdit();
                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.GetIssue());
                    bp.Update();

                    //LoadRoot();

                    setCurrentNode(nodeKey);
                    inEditMode           = false;
                    lblRtfEdited.Visible = false;
                    SetRTFValues(false);
                    //TreeNode[] tn=treeView1.Nodes.Find(CurrentRow().ParentIssueId.ToString(), true);
                    //TreeNode nd = treeView1.SelectedNode;
                    //nd.Remove();
                    //tn[0].Nodes.Add(nd);
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
示例#23
0
        private void Delete()
        {
            try
            {
                if (UIHelper.ConfirmDelete())
                {
                    CurrentRow().Delete();
                    this.issueBindingSource1.EndEdit();

                    atLogic.BusinessProcess bp = AtMng.GetBP();
                    bp.AddForUpdate(AtMng.GetIssue());
                    bp.Update();

                    lmDatasets.appDB.IssueRow ir = (lmDatasets.appDB.IssueRow)treeView1.SelectedNode.PrevNode.Tag;
                    treeView1.SelectedNode.Remove();
                    setBindingSourcePosition(ir.IssueId);
                    setCurrentNode(ir.IssueId.ToString());

                    //treeView1.Enabled = true;
                    //LoadRoot();
                }
            }
            catch (Exception x)
            {
                throw x;
            }
        }
示例#24
0
 private void SaveTentativeMember()
 {
     grexAppealsReadyForAssignment.UpdateData();
     this.tribunalMemberAssignmentBindingSource.EndEdit();
     atLogic.BusinessProcess bp = myAtMng.GetBP();
     bp.AddForUpdate(myMemMng.GetTribunalMemberAssignment());
     bp.Update();
 }
示例#25
0
 private void Save()
 {
     cGridEX.CurrentRow.EndEdit();
     cGridEX.UpdateData();
     atLogic.BusinessProcess bp = AtMng.GetBP();
     bp.AddForUpdate(obe);
     bp.Update();
 }
示例#26
0
        private void btnDismiss_Click(object sender, EventArgs e)
        {
            try
            {
                int            attendeeId;
                List <DataRow> rowList = new List <DataRow>();

                foreach (Janus.Windows.GridEX.GridEXSelectedItem gsi in gridEXNotification.SelectedItems)
                {
                    if (gsi.RowType == Janus.Windows.GridEX.RowType.Record)
                    {
                        rowList.Add(((DataRowView)gsi.GetRow().DataRow).Row);
                    }
                }

                if (rowList.Count > 0)
                {
                    foreach (DataRow dr in rowList)
                    {
                        attendeeId = (int)dr["AttendeeId"];//.ItemArray[0];
                        atriumDB.AttendeeRow attrow = currentFM.DB.Attendee.FindByAttendeeId(attendeeId);
                        if (!attrow.IsNotificationDismissNull())
                        {
                            attrow.BeginEdit();
                            attrow.NotificationDismiss = true;
                            attrow.Interval            = 0;

                            attrow.EndEdit();
                        }
                        dr.Delete();
                        dr.AcceptChanges();
                    }
                    atLogic.BusinessProcess bp = currentFM.GetBP();
                    bp.AddForUpdate(currentFM.DB.Attendee);
                    bp.Update();

                    DataTable dt = (DataTable)bSourceAppointmentDataview.DataSource;
                    if (dt.Rows.Count == 0)
                    {
                        this.Close();
                    }
                    SetFormHeader(dt.Rows.Count);
                    Refresh();
                }
                else
                {
                    this.Close();
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
示例#27
0
        private void Save()
        {
            provinceGridEX.CurrentRow.EndEdit();
            provinceGridEX.UpdateData();
            provinceGridEX.Update();
            provinceBindingSource.EndEdit();

            atLogic.BusinessProcess bp = AtMng.GetBP();
            bp.AddForUpdate(AtMng.GetProvince());
            bp.AddForUpdate(AtMng.GetCity());
            bp.Update();
        }
示例#28
0
        public void Save()
        {
            try
            {
                secGroupGridEX.UpdateData();
                secGroupBindingSource.EndEdit();

                atLogic.BusinessProcess bp = mySecMan.GetBP();
                bp.AddForUpdate(mySecMan.GetsecGroup());
                bp.AddForUpdate(mySecMan.GetsecMembership());
                bp.Update();
            }
            catch (Exception x)
            {
                throw x;
            }
        }
示例#29
0
        public void Save()
        {
            try
            {
                secRuleGridEX.UpdateData();
                secRuleBindingSource.EndEdit();

                atLogic.BusinessProcess bp = mySecMan.GetBP();
                bp.AddForUpdate(mySecMan.GetsecRule());
                bp.AddForUpdate(mySecMan.GetsecPermission());
                bp.Update();
            }
            catch (Exception x)
            {
                throw x;
            }
        }
示例#30
0
        public override void Save()
        {
            if (FM.LeadOfficeMng.DB.Officer.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(FM.LeadOfficeMng.DB);
            }
            else
            {
                try
                {
                    int linkId = CurrentRow().OfficerId;

                    officerDelegateGridEX.UpdateData();
                    officerRoleGridEX.UpdateData();
                    contactEmailGridEX.UpdateData();

                    this.officerBindingSource.EndEdit();
                    this.officerDelegateBindingSource.EndEdit();
                    this.officerRoleBindingSource.EndEdit();
                    this.contactEmailBindingSource.EndEdit();
                    this.memberProfileBindingSource.EndEdit();
                    addressBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = FM.GetBP();

                    bp.AddForUpdate(FM.LeadOfficeMng.GetOfficer());
                    bp.AddForUpdate(FM.GetAddress());
                    bp.AddForUpdate(FM.LeadOfficeMng.GetOfficerRole());
                    bp.AddForUpdate(FM.LeadOfficeMng.GetOfficerDelegate());
                    bp.AddForUpdate(FM.LeadOfficeMng.GetContactEmail());
                    bp.AddForUpdate(FM.LeadOfficeMng.GetMemberProfile());
                    bp.Update();



                    ApplyBR(true);

                    officerBindingSource.Position = officerBindingSource.Find("OfficerId", linkId);
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }