Exemple #1
0
 public void RollbackSRP(atriumDB.SRPRow srpRow)
 {
     if (!srpRow.IsSRPSubmittedDateNull() && myA.AtMng.SecurityManager.CanExecute(0, atSecurity.SecurityManager.Features.SysAdmin) == atSecurity.SecurityManager.ExPermissions.Yes)
     {
         myA.AtMng.AppMan.ExecuteSP("adm_UndoSRP", srpRow.SRPID);
     }
 }
Exemple #2
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "tsAudit":
                    fData fAudit = new fData(CurrentRow());
                    fAudit.Show();
                    break;

                case "cmdViewSRP":
                    atriumDB.SRPRow srprow           = FM.GetSRP().Load(CurrentRow().SRPID);
                    fFile           agentBillingFile = FileForm().MainForm.OpenFile(srprow.FileID);
                    agentBillingFile.MoreInfo("srp", srprow.SRPID);
                    break;

                case "cmdSRPDetail":
                    atriumDB.SRPRow srprow2           = FM.GetSRP().Load(CurrentRow().SRPID);
                    fFile           agentBillingFile2 = FileForm().MainForm.OpenFile(srprow2.FileID);
                    agentBillingFile2.MoreInfo("srpdetail", srprow2.SRPID);
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Exemple #3
0
        protected override void AfterAdd(DataRow row)
        {
            atriumDB.SRPRow dr         = (atriumDB.SRPRow)row;
            string          ObjectName = this.mySRPDT.TableName;

            dr.SRPID = this.myA.AtMng.PKIDGet(ObjectName, 1);
            //jll commented out 2012-01-27; myFM is null, OfficeManager.OfficeId is same as LeadOfficeId on myFM
            dr.OfficeID = myA.CurrentFile.LeadOfficeId;
            //dr.OfficeID = myA.CurrentOffice.OfficeId;

            //office row must be loaded kerim
            // test this code with dec 31/2003, jan 1/2004, mar 31/2004, april 1/2004
            if (myA.LeadOfficeMng.CurrentOffice.UsesBilling)
            {
                dr.SRPDate = atDates.StandardDate.ThisQuarter.EndDate.Date;
            }

            //JLL: added myFM!=null since myFM no longer set on Load
            else if (myA.CurrentFile.FileType.ToUpper() == "PR") //Timekeeping SRP JL: 2009/07/06
            {
                dr.SRPDate = atDates.StandardDate.ThisMonth.BeginDate.Date;
            }

            else
            {
                dr.SRPDate = DateTime.Today;
            }
        }
Exemple #4
0
        public override void MoreInfo(string linkTable, int linkId)
        {
            if (linkTable.ToUpper() == "SRPDETAIL")
            {
                srpId = linkId;
                if (!loadedSRPs.Contains(linkId))
                {
                    iRPBindingSource.SuspendBinding();
                    toggleLoad(true);
                    iRPGridEX.DataSource = null;
                    iRPGridEX.Refetch();
                    Application.DoEvents();
                    FM.GetIRP().LoadBySRPId(linkId);
                    //    FM.GetCLASMng().GetTaxing().LoadBySRPID(linkId);
                    loadedSRPs.Add(linkId);
                    FM.GetSRP().Load(linkId);
                    toggleLoad(false);
                    iRPBindingSource.ResumeBinding();
                    iRPGridEX.DataSource = iRPBindingSource;
                }

                srpRow = ((atriumDB.SRPRow[])FM.DB.SRP.Select("SRPID=" + linkId))[0];
                iRPBindingSource.Filter = "SRPID=" + linkId;

                if (iRPBindingSource.Count == 0 && FM.GetIRP().CanAdd(srpRow, FM.CurrentFile.FileId))
                {
                    NewIRP();
                }
            }
            else if (linkTable.ToUpper() == "SRPDETAILIRP")
            {
                iRPBindingSource.Position = iRPBindingSource.Find("IRPID", linkId);
            }
        }
Exemple #5
0
        protected override void AfterUpdate(DataRow dr)
        {
            atriumDB.SRPRow r = (atriumDB.SRPRow)dr;

            System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
            xd.InnerXml = r.EFileRow.FileStructXml;
            MyXml(r.EFileRow, xd);
            r.EFileRow.FileStructXml = xd.InnerXml;
        }
Exemple #6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dr">SRP Row</param>
        /// <param name="billingFileId">File ID of Billing File</param>
        /// <returns></returns>
        public bool CanAdd(DataRow dr, int billingFileId)
        {
            atriumDB.SRPRow srpr = (atriumDB.SRPRow)dr;

            if (myA.CurrentFile.OwnerOfficeId == myA.AtMng.WorkingAsOfficer.OfficeId && !myA.LeadOfficeMng.CurrentOffice.UsesBilling && srpr.IsTaxationCompletedNull())
            {
                return(true);
            }

            return(false);
        }
Exemple #7
0
 public bool isSRPTaxationCompleted(atriumDB.IRPRow irpRow)
 {
     atriumDB.SRPRow srprow = myA.GetSRP().Load(irpRow.SRPID);
     if (srprow.IsTaxationCompletedNull())
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
Exemple #8
0
        public override bool CanDelete(DataRow dr)
        {
            bool ok = false;

            atriumDB.SRPRow srpr = (atriumDB.SRPRow)dr;
            atSecurity.SecurityManager.LevelPermissions perm = myA.AtMng.SecurityManager.CanDelete(srpr.FileID, atSecurity.SecurityManager.Features.SRP);
            if (perm != atSecurity.SecurityManager.LevelPermissions.No)
            {
                ok = true;
            }

            return(ok);
        }
Exemple #9
0
        public void Import(string disbType, int srpId, int docId)
        {
            fms = new Dictionary <int, FileManager>();
            atriumDB.SRPRow drSrp = Load(srpId);

            switch (disbType)
            {
            case "Bulk":
                DisbBulk(drSrp, docId);
                break;

            case "All":
                DisbAll(drSrp, docId);
                break;
            }
        }
Exemple #10
0
        protected override void AfterChange(DataColumn dc, DataRow ddr)
        {
            string ObjectName = this.mySRPDT.TableName;

            atriumDB.SRPRow dr = (atriumDB.SRPRow)ddr;


            switch (dc.ColumnName)
            {
            case "TaxationCompleted":
                break;

            default:
                break;
            }
        }
Exemple #11
0
        public void CloseActivityTimePeriod(int srpId)
        {
            atriumDB.SRPRow drSrp = this.Load(srpId);
            if (drSrp.IsSRPSubmittedDateNull())
            {
                FileManager         fm = this.myA.AtMng.GetFile(drSrp.FileID);
                officeDB.OfficerRow or = fm.AtMng.OfficeMng.GetOfficer().LoadByMyFileId(fm.CurrentFile.FileId);
                if (or != null)
                {
                    try
                    {
                        //drSrp.BeginEdit();
                        //drSrp.SRPSubmittedDate = DateTime.Today;
                        //drSrp.EndEdit();

                        ////officeDB.SRPRow newSrp = (officeDB.SRPRow)this.Add(fm.CurrentFile);
                        ////newSrp.FileID = fm.CurrentFile.FileId;
                        ////newSrp.entryUser = "******";
                        ////newSrp.SRPDate = drSrp.SRPDate.AddMonths(1);

                        //BusinessProcess bp = myA.GetBP();
                        //bp.AddForUpdate(this);
                        //bp.Update();

                        //TODO: make sure this is part of the transaction
                        //this.myA.AppMan.ExecuteSP("SubmitTimeslip", drSrp.SRPID, or.OfficerId, drSrp.SRPDate, drSrp.SRPDate.AddMonths(1).AddDays(-1), DateTime.Today);

                        atriumDB.SRPDataTable dt = myDAL.SubmitTimeslip(drSrp.SRPID, or.OfficerId, drSrp.SRPDate, drSrp.SRPDate.AddMonths(1).AddDays(-1));
                        Fill(dt);
                        //this.Load(srpId);
                    }
                    catch
                    {
                        throw;
                    }
                }
                else
                {
                    throw new AtriumException("No officer for file");
                }
            }
            else
            {
                throw new AtriumException("Activity Time Period is already closed");
            }
        }
Exemple #12
0
        private void sRPBindingSource_CurrentChanged(object sender, EventArgs e)
        {
            try
            {
                atriumDB.SRPRow dr = CurrentRow();

                if (dr == null || dr.IsNull("SRPID"))
                {
                    NoData();
                    return;
                }

                ApplySecurity(dr);
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Exemple #13
0
        public void GenSrp(int srpId)
        {
            atriumDB.SRPRow    drSrp    = this.Load(srpId);
            officeDB.OfficeRow drOffice = this.myA.LeadOfficeMng.CurrentOffice; //.GetOffice(drSrp.OfficeID);

            if (!drOffice.UsesBilling)
            {
                throw new AtriumException(Resources.SRPNoOnlineBilling);
            }

            if (drSrp.IsSRPSubmittedDateNull())
            {
                this.myA.AppMan.ExecuteSP("InsertIRP", drSrp.OfficeID, srpId);
            }
            else
            {
                throw new AtriumException(Resources.SRPAlreadySubmitted);
            }
        }
Exemple #14
0
        private void CreateNewTimeSlip(DateTime SRPDate)
        {
            atriumDB.SRPRow newSrp = (atriumDB.SRPRow)FM.GetSRP().Add(FM.CurrentFile);
            newSrp.FileID = FM.CurrentFile.FileId;
            if (SRPDate != null)
            {
                newSrp.SRPDate = SRPDate;
            }
            try
            {
                atLogic.BusinessProcess bp = FM.GetBP();
                bp.AddForUpdate(FM.GetSRP());

                bp.Update();
            }
            catch (Exception x)
            {
                FM.DB.SRP.RejectChanges();
            }
        }
Exemple #15
0
        public bool isAllIRPsTaxed(atriumDB.SRPRow srpRow)
        {
            bool allTaxed = true;

            atriumDB.IRPRow[] trc = srpRow.GetIRPRows();
            if (trc.Length == 0)
            {
                myA.GetIRP().LoadBySRPId(srpRow.SRPID);
                trc = srpRow.GetIRPRows();
            }

            foreach (atriumDB.IRPRow tr in trc)
            {
                if (tr.IsDateTaxedNull())
                {
                    allTaxed = false;
                    break;
                }
            }
            return(allTaxed);
        }
Exemple #16
0
        protected override void BeforeUpdate(DataRow row)
        {
            atriumDB.SRPRow dr = (atriumDB.SRPRow)row;
            this.BeforeChange(dr.Table.Columns["SRPDate"], dr);
            this.BeforeChange(dr.Table.Columns["SRPSubmittedDate"], dr);

            if (!dr.IsTaxationCompletedNull() &&
                dr.HasVersion(DataRowVersion.Original) && dr.IsNull(mySRPDT.TaxationCompletedColumn, DataRowVersion.Original))
            //!dr["TaxationCompleted", DataRowVersion.Original].Equals(dr["TaxationCompleted", DataRowVersion.Current]))
            {
                OfficeAccountBE agentAcc = this.myA.GetCLASMng().GetOfficeAccount();
                FileManager     fm       = myA.AtMng.GetFile(dr.FileID);

                decimal qraBalance = agentAcc.BalanceOn(dr.SRPDate);
                decimal srpTotal   = dr.TotalTaxed;
                decimal qrw        = 0;


                if (qraBalance != 0)
                {
                    if (srpTotal < qraBalance)
                    {
                        qrw = srpTotal;
                    }
                    else
                    {
                        qrw = qraBalance;
                    }
                    CLAS.OfficeAccountRow agentAccRow = (CLAS.OfficeAccountRow)agentAcc.Add(fm.CurrentFile);

                    agentAccRow.Amount          = -qrw;
                    agentAccRow.TransactionDate = dr.SRPDate;
                    agentAccRow.PostingDate     = DateTime.Today;
                    agentAccRow.Description     = "QR Withdrawal";
                    agentAccRow.Type            = "QW";
                    agentAccRow.SRPID           = dr.SRPID;
                }
            }
        }
Exemple #17
0
        public void Export(string type, int srpId, string path)
        {
            atriumDB.SRPRow    drSrp    = this.Load(srpId);
            officeDB.OfficeRow drOffice = this.myA.LeadOfficeMng.CurrentOffice;//.GetOffice(drSrp.OfficeID);

            DataSet ds;

            //  string fileName = drOffice.OfficeCode + "_" + drSrp.SRPDate.ToString("yyyyMMdd");

            if (type == "Disb")
            {
                //    fileName += "_Disb";
                ds = this.myA.AppMan.ExecuteDataset("ExportDisbursements", drSrp.OfficeID, drSrp.SRPID);
            }
            else // (type == "Fees")
            {
                //   fileName += "_Fees";
                ds = this.myA.AppMan.ExecuteDataset("ExportFees", drSrp.OfficeID, drSrp.SRPID);
            }

            //string fullFilePath = System.IO.Path.Combine(filePath,fileName);
            this.myA.WriteDataTableToCSV(path, ds.Tables[0], "", true);


            //docDB.DocumentRow dr = (docDB.DocumentRow)myA.GetDocMng().GetDocument().Add(myA.CurrentFile);
            //myA.GetDocMng().GetDocContent().Add(dr);
            //dr.DocContentRow.Ext = ".csv";
            //dr.efSubject = DocumentBE.VerifySubjectLength(fileName);
            //dr.DocContentRow.ContentsAsText = sb.ToString();
            //dr.IsDraft = false;

            //BusinessProcess bp = myA.GetDocMng().GetBP();

            //bp.AddForUpdate(myA.GetDocMng().GetDocContent());
            //bp.AddForUpdate(myA.GetDocMng().GetDocument());
            //bp.Update();

            //return dr.DocId;
        }
Exemple #18
0
        public void MyXml(atriumDB.SRPRow sr, System.Xml.XmlDocument xd)
        {
            System.Xml.XmlElement xeb = EFileBE.XmlAddFld(xd, "srp", "Agent Billings", "Facturation de mandataire", 250);
            System.Xml.XmlElement xes = EFileBE.XmlAddFld(xeb, "srp" + sr.SRPID.ToString(), "SRP " + sr.SRPDate.ToString("yyyy/MM/dd"), "SDP " + sr.SRPDate.ToString("yyyy/MM/dd"), 250);

            System.Xml.XmlElement xe = xd.CreateElement("toc");
            xe.SetAttribute("supertype", "srp");
            xe.SetAttribute("type", "srp");
            xe.SetAttribute("id", sr.SRPID.ToString());
            xe.SetAttribute("titlee", "SRP Info");
            xe.SetAttribute("titlef", "Info SDP");
            xes.AppendChild(xe);

            System.Xml.XmlElement xeIRP = xd.CreateElement("toc");
            xeIRP.SetAttribute("supertype", "srp");
            xeIRP.SetAttribute("type", "srpdetail");
            xeIRP.SetAttribute("id", sr.SRPID.ToString());
            xeIRP.SetAttribute("titlee", "SRP Detail");
            xeIRP.SetAttribute("titlef", "Détails SDP");
            xes.AppendChild(xeIRP);

            if (myA.LeadOfficeMng.CurrentOffice.UsesBilling)
            {
                System.Xml.XmlElement xeBR = xd.CreateElement("toc");
                xeBR.SetAttribute("supertype", "srp");
                xeBR.SetAttribute("type", "billingreview");
                xeBR.SetAttribute("id", sr.SRPID.ToString());
                xeBR.SetAttribute("titlee", "Billing Review");
                xeBR.SetAttribute("titlef", "Révision de facturation");
                xes.AppendChild(xeBR);
            }

            //if (xes.ParentNode == null)
            //{
            //    System.Xml.XmlElement xeb = EFileBE.XmlAddFld(xd, "srp", "Agent Billings", "Agent Billings", 250);
            //    xeb.AppendChild(xes);
            //}
        }
Exemple #19
0
        /// <summary>
        /// clears activitytime and srpclient rows related to the srprow from the datatables and reloads/recalculates totals for srp and srpclient for unclosed period.  will return w/o executing recalculation for closed period - i.e. srpsubmitted date is not null
        /// </summary>
        /// <param name="drSRP">the srp data row that requires the recalculation</param>
        private void CalculateOpenPeriodTotals(atriumDB.SRPRow drSRP)
        {
            //update total on timekeeping period based on data on client
            DateTime endDate = drSRP.SRPDate.AddMonths(1).AddMinutes(-1);

            officeDB.OfficerRow or = FM.AtMng.OfficeMng.GetOfficer().LoadByMyFileId(FM.CurrentFile.FileId);
            try
            {
                decimal srpHours = Convert.ToDecimal(TSdt.Compute("sum(Hours)", "StartTime>= '" + drSRP.SRPDate + "' and StartTime<='" + endDate + "' and OfficerId=" + or.OfficerId + " and SRPDate is null"));
                drSRP.FeesClaimed = srpHours;
            }

            catch (Exception x)
            {
                drSRP.FeesClaimed = 0;
            }


            //remove rows from srpclient datatable
            List <appDB.SRPClientRow> clientSRPsToRemove = new List <appDB.SRPClientRow>();

            foreach (appDB.SRPClientRow drSRPClient in SRPClientDt)
            {
                if (drSRPClient.SRPId == drSRP.SRPID)
                {
                    clientSRPsToRemove.Add(drSRPClient);
                }
            }
            foreach (appDB.SRPClientRow listClientRow in clientSRPsToRemove)
            {
                SRPClientDt.RemoveSRPClientRow(listClientRow);
            }
            LoadedSRPs.Remove(drSRP.SRPID);

            //reload client data
            LoadSrpClient(or.OfficerId, drSRP.SRPID, drSRP.SRPDate, endDate);
        }
Exemple #20
0
        private void DisbBulk(atriumDB.SRPRow drSrp, int docId)
        {
            bool encounteredError = false;
            int  lineNum          = 0;


            try
            {
                docDB.DocumentRow doc = myA.GetDocMng().GetDocument().Load(docId);

                // Create an instance of StreamReader to read from a file.
                // The using statement also closes the StreamReader.
                using (StringReader sr = new StringReader(doc.DocContentRow.ContentsAsText))
                {
                    String line;

                    // Read and display lines from the file until the end of
                    // the file is reached.

                    while ((line = sr.ReadLine()) != null && (line != ""))
                    {
                        line = line.Replace("\"", "");
                        lineNum++;
                        string[] elem = new string[6];
                        line.Split(',').CopyTo(elem, 0);

                        string   officeFileNo = elem[0];
                        DateTime disbDate     = DateTime.Parse(elem[1]);
                        string   disbTypeCode = elem[2];
                        string   comment      = elem[5] == null ? "" : elem[5];

                        if ((elem[3] == null || elem[3] == "") && (elem[4] == null || elem[4] == ""))
                        {
                            WriteErrorLog(officeFileNo, disbTypeCode, disbDate, Resources.BothTaxableDisbursementAndNonTaxableDisbursementCannotBeBlank);
                            encounteredError = true;
                        }
                        else
                        {
                            decimal taxableDisb;
                            decimal nonTaxableDisb;
                            if (elem[3] == null || elem[3] == "")
                            {
                                taxableDisb = 0;
                            }
                            else
                            {
                                taxableDisb = Convert.ToDecimal(elem[3]);
                            }

                            if (elem[4] == null || elem[4] == "")
                            {
                                nonTaxableDisb = 0;
                            }
                            else
                            {
                                nonTaxableDisb = Convert.ToDecimal(elem[4]);
                            }
                            CodesDB.DisbursementTypeRow disbTypeR = myA.AtMng.CodeDB.DisbursementType.FindByDisbursementType(disbTypeCode);
                            DisbBulkRow(officeFileNo, disbDate, disbTypeR, taxableDisb, nonTaxableDisb, comment, ref encounteredError, drSrp.OfficeID, drSrp.SRPDate);
                        }
                    } // end of while loop
                }
            }
            catch (Exception e)
            {
                // Let the user know what went wrong.
                WriteErrorLog(Resources.LineNumber + lineNum.ToString() + " - " + e.Message);
                System.Diagnostics.Debug.WriteLine(e.ToString());
                throw e;
            }
            DisbUpdate(encounteredError);

            WriteErrorLog(lineNum.ToString() + Resources.DisbursementRecordsImportedSuccessfully);
        }
Exemple #21
0
        public override void Delete()
        {
            try
            {
                //would like to have most of this moved to BE CanDelete, but the UI interaction with the confirm messages makes it impossible at the moment
                bool okToDelete = false;
                if (CurrentRow().Closed)
                {
                    //since it's closed, candelete will return true if canoverride=true
                    if (FM.GetCLASMng().GetTaxing().CanDelete(CurrentRow()))
                    {
                        //check to see if IRPId is null; if so, who cares about link back to irp, there is none; go ahead and chuck
                        if (CurrentRow().IsIRPIdNull())
                        {
                            okToDelete = true;
                        }
                        else
                        {
                            //check state of srp to see if taxation completed; if so, warn about impact
                            //loading irp and srp data to read it
                            atriumDB.IRPRow irpRow = FM.DB.IRP.FindByIRPId(CurrentRow().IRPId);
                            if (irpRow == null)
                            {
                                //a LoadByIRPID would be nice here ... but whatever, only called when deleting a taxrec by an overrider, very isolated
                                FM.GetIRP().Load();
                                irpRow = FM.DB.IRP.FindByIRPId(CurrentRow().IRPId);
                            }
                            atriumDB.SRPRow srpRow = FM.GetSRP().Load(irpRow.SRPID);

                            if (!srpRow.IsTaxationCompletedNull())
                            {
                                if (MessageBox.Show("This taxing recommendation is closed and linked to an IRP for which taxation has been completed on the SRP.  You cannot modify the IRP values as they are read-only.\n\nAre you sure you want to proceed with deleting this linked and closed taxing recommendation?", "Closed and Linked Taxing Recommendation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                                {
                                    okToDelete = true;
                                }
                            }
                            else // taxation not completed yet
                            {
                                if (MessageBox.Show("This taxing recommendation is closed and linked to an IRP for which taxation is not completed on the SRP.  You may still modify the IRP values to account for the deleting of this taxing recommendation if need be.\n\nAre you sure you want to proceed with deleting this linked and closed taxing recommendation?", "Closed and Linked Taxing Recommendation", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                                {
                                    okToDelete = true;
                                }
                            }

                            //if taxation not completed, explain that taxed amounts can still be manipulated until SRP taxation completed date populated
                        }
                    }
                }
                else
                {//JLL: 2016/09/28, added Else so taxrec gets delete when not closed
                    if (FM.GetCLASMng().GetTaxing().CanDelete(CurrentRow()))
                    {
                        okToDelete = true;
                    }
                }

                if (okToDelete)
                {
                    CurrentRow().Delete();
                    taxingBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = FM.GetBP();
                    bp.AddForUpdate(FM.GetCLASMng().GetTaxing());
                    bp.AddForUpdate(FM.EFile);
                    bp.Update();

                    ApplyBR(true);

                    fFile f = (fFile)this.ParentForm;
                    f.fileToc.LoadTOC();
                }
            }
            catch (Exception x)
            {
                throw x;
            }
        }
Exemple #22
0
        public void SubmitSrp(int srpId)
        {
            atriumDB.SRPRow    drSrp    = this.Load(srpId);
            officeDB.OfficeRow drOffice = this.myA.LeadOfficeMng.CurrentOffice;// GetOffice(drSrp.OfficeID);
            FileManager        fm       = this.myA.AtMng.GetFile(drSrp.FileID);

            if (!drOffice.UsesBilling)
            {
                throw new AtriumException(Resources.SRPNoOnlineBilling);
            }

            if (drSrp.IsSRPSubmittedDateNull())
            {
                try
                {
                    drSrp.BeginEdit();
                    drSrp.SRPSubmittedDate = DateTime.Today;
                    drSrp.EndEdit();

                    atriumDB.SRPRow newSrp = (atriumDB.SRPRow) this.Add(fm.CurrentFile);
                    newSrp.FileID    = fm.CurrentFile.FileId;
                    newSrp.entryUser = "******";

                    if (myA.AtMng.AppMan.UseService)
                    {
                        DataSet ds = new DataSet();
                        //ds.Tables.Add((atriumDB.SRPDataTable)myDT.GetChanges());
                        System.Data.DataTable dt = myDT.GetChanges();
                        if (dt != null)
                        {
                            dt.ExtendedProperties.Remove("BE");
                        }
                        ds.Tables.Add(dt);
                        Fill(myA.AtMng.AppMan.AtriumX().SubmitSRP(atLogic.BEManager.CompressData(ds), drSrp.SRPID, myA.AtMng.AppMan.AtriumXCon));
                    }
                    else
                    {
                        Fill(myDAL.SubmitSRP((atriumDB.SRPDataTable)myDT.GetChanges(), drSrp.SRPID));
                    }
                    myA.SaveAll();

                    //this.myA.GetIRP().LoadBySRPId(srpId);

                    ////TODO: long running transaction issue
                    //BusinessProcess bp = myA.GetBP();
                    //bp.AddForUpdate(this);

                    //foreach (atriumDB.IRPRow drIrp in drSrp.GetIRPRows())
                    //{
                    //    this.myA.AppMan.ExecuteSP("SubmitIRP", drSrp.OfficeID, drIrp.IRPId, drIrp.FileID, drSrp.SRPDate);
                    //}

                    //bp.Update();
                }
                catch
                {
                    throw;
                }
            }
            else
            {
                throw new AtriumException(Resources.SRPAlreadySubmitted);
            }
        }
Exemple #23
0
        public void Execute(appDB.BatchRow drBatch)
        {
            try
            {
                //JLL:2012-01-30 change as a result of moving SRP to atriumDB
                //SRPBE srpBE = this.myA.OfficeMng.GetSRP();
                SRPBE srpBE = this.myA.GetFile().GetSRP();

                this.myA.Impersonate(drBatch.UserName, drBatch.OfficeCode);

                drBatch.BeginEdit();
                drBatch.Status       = "A";
                drBatch.StartRunDate = DateTime.Now;
                drBatch.EndEdit();
                Save();

                drBatch.BeginEdit();

                int      srpId;
                string[] param;

                switch (drBatch.JobName)
                {
                case "RunSQL":
                    myA.DALMngr.ExecuteNonQuery(drBatch.Parameters);

                    break;

                case "CreateACFFN":
                    param = drBatch.Parameters.Split(',');
                    string ffn         = param[0];
                    int    fileId1     = myA.GetFile(ffn).CurrentFileId;
                    int    acseriesId1 = System.Convert.ToInt32(param[1]);

                    DateTime acDate1 = drBatch.BatchDate.Date;
                    if (param.Length >= 3)
                    {
                        acDate1 = DateTime.Parse(param[2]);
                    }
                    string ctxTable1 = null;
                    int    ctxId1    = 0;
                    if (param.Length >= 4)
                    {
                        ctxTable1 = param[3];
                    }
                    if (param.Length >= 5)
                    {
                        ctxId1 = System.Convert.ToInt32(param[4]);
                    }
                    CreateAC(fileId1, acseriesId1, acDate1, ctxTable1, ctxId1);
                    break;

                case "CreateAC":
                    param = drBatch.Parameters.Split(',');
                    int      fileId     = System.Convert.ToInt32(param[0]);
                    int      acseriesId = System.Convert.ToInt32(param[1]);
                    DateTime acDate     = drBatch.BatchDate.Date;
                    if (param.Length >= 3)
                    {
                        acDate = DateTime.Parse(param[2]);
                    }
                    string ctxTable = null;
                    int    ctxId    = 0;
                    if (param.Length >= 4)
                    {
                        ctxTable = param[3];
                    }
                    if (param.Length >= 5)
                    {
                        ctxId = System.Convert.ToInt32(param[4]);
                    }

                    CreateAC(fileId, acseriesId, acDate, ctxTable, ctxId);

                    break;

                case "CommitSRP":
                    srpId = Convert.ToInt32(drBatch.Parameters);
                    srpBE.LoadOfficeManager(srpId);
                    srpBE.GenSrp(srpId);
                    srpBE.SubmitSrp(srpId);
                    break;

                case "GenerateSRP":
                    srpId = Convert.ToInt32(drBatch.Parameters);
                    srpBE.LoadOfficeManager(srpId);
                    srpBE.GenSrp(srpId);
                    break;

                //case "ExportDisb":
                //    srpId = Convert.ToInt32(drBatch.Parameters);
                //    srpBE.LoadOfficeManager(srpId);
                //    //drBatch.OutputFile = myA.OfficeMng.GetSRP().Export("Disb", srpId).ToString();
                //    drBatch.OutputFile = myA.GetFile().GetSRP().Export("Disb", srpId).ToString();
                //    break;
                //case "ExportFees":
                //    srpId = Convert.ToInt32(drBatch.Parameters);
                //    srpBE.LoadOfficeManager(srpId);
                //    //drBatch.OutputFile = myA.OfficeMng.GetSRP().Export("Fees", srpId).ToString();
                //    drBatch.OutputFile = myA.GetFile().GetSRP().Export("Fees", srpId).ToString();
                //    break;
                case "PLOfficeUpdate":
                    this.myA.AppMan.ExecuteSP("PLOfficeDistribUpdate");
                    break;

                case "ImportDisb":
                    param = drBatch.Parameters.Split(',');

                    // param[0] srpid
                    // param[1] UploadPath
                    // param[2] DisbType

                    srpId = Convert.ToInt32(param[0]);
                    srpBE.LoadOfficeManager(srpId);
                    int    uploadPath = Convert.ToInt32(param[1]);
                    string disbType   = param[2];


                    //JLL: I know this ain't right, that's for sure. Add fileid parameter?
                    atriumDB.SRPRow drSrp = this.myA.GetFile().DB.SRP.FindBySRPID(srpId);
                    if (drSrp == null)
                    {
                        drSrp = srpBE.Load(srpId);
                    }
                    if (drSrp.IsSRPSubmittedDateNull())
                    {
                        //string errLogFileName = Path.GetFileNameWithoutExtension(uploadPath) + "_err.log";
                        //string errLogPath = Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(uploadPath)), "Output\\" + errLogFileName);

                        try
                        {
                            srpBE.Import(disbType, srpId, uploadPath);
                        }
                        catch (Exception e)
                        {
                            //drBatch.OutputFile = errLogPath;
                            throw e;
                        }
                    }
                    else
                    {
                        throw new AtriumException(atriumBE.Properties.Resources.BatchImportNotAllowed);
                    }
                    break;

                default:
                    throw new AtriumException(atriumBE.Properties.Resources.BatchInvalidJobName);
                }

                drBatch.Message    = "Job succeeded";
                drBatch.Status     = "F";
                drBatch.Completed  = true;
                drBatch.EndRunDate = DateTime.Now;
                drBatch.EndEdit();
                Save();
            }
            catch (Exception err)
            {
                drBatch.Message    = "Job failed: " + "/n/r" + err.Message;
                drBatch.Status     = "X";
                drBatch.Completed  = true;
                drBatch.EndRunDate = DateTime.Now;
                drBatch.EndEdit();
                Save();

                myA.LogError(err);

                CreateAC(myA.GetSetting(AppIntSetting.BatchJobFailedFileId), myA.GetSetting(AppIntSetting.BatchJobFailedAcSeriesId));
            }
        }
Exemple #24
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                Janus.Windows.UI.CommandBars.UICommandBar bar = uiCommandManager1.CommandBars["cbMergeToolbar"];
                if (bar.Commands.Contains(e.Command.Key) && bar.Commands[e.Command.Key].Commands.Count > 0)
                {
                    bar.Commands[e.Command.Key].Expand();
                }

                switch (e.Command.Key)
                {
                case "tsImportBulk":
                    int docId = UploadFile();
                    if (docId != 0)
                    {
                        FM.AtMng.GetBatch().SubmitJob("ImportDisb", CurrentRow().FileID.ToString() + "," + CurrentRow().SRPID.ToString() + "," + docId.ToString() + ",Bulk");
                    }
                    break;

                case "tsImportAll":
                    int docId1 = UploadFile();
                    if (docId1 != 0)
                    {
                        FM.AtMng.GetBatch().SubmitJob("ImportDisb", CurrentRow().FileID.ToString() + "," + CurrentRow().SRPID.ToString() + "," + docId1.ToString() + ",All");
                    }
                    break;

                case "tsExportFees":
                    Export("Fees");
                    break;

                case "tsExportDisb":
                    Export("Disb");
                    break;

                case "cmdSave":
                    Save();
                    break;

                case "cmdDelete":
                    Delete();
                    break;

                case "cmdNew":
                    atriumDB.SRPRow newSrp = (atriumDB.SRPRow)FM.GetSRP().Add(FM.CurrentFile);
                    sRPBindingSource.Position = sRPBindingSource.Find("SRPID", newSrp.SRPID);
                    ApplySecurity(newSrp);
                    break;

                case "tsGenSRP":
                    //TODO why is this load office manager here?!
                    if (MessageBox.Show("You are about to generate your SRP. This operation might take a few seconds.\n\nAre you sure you want to perform this operation?", "Generate SRP", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                    {
                        Application.UseWaitCursor = true;
                        Application.DoEvents();
                        FM.GetSRP().LoadOfficeManager(CurrentRow().SRPID);
                        FM.GetSRP().GenSrp(CurrentRow().SRPID);
                        FileForm().ReloadFileData();
                        Application.UseWaitCursor = false;
                        MessageBox.Show("Your SRP was successfully generated.");
                    }
                    //MessageBox.Show(LawMate.Properties.Resources.UIGenerateSRP, LawMate.Properties.Resources.UIGenerateSRPCaption);
                    break;

                case "tsSubmitSRP":
                    if (MessageBox.Show("-------------------------\n------SUBMIT SRP------\n-------------------------\n\nYou are about to submit your SRP. This operation might take a few seconds.\n\nAre you sure you want to submit your SRP?", "Submit SRP", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                    {
                        Application.UseWaitCursor = true;
                        Application.DoEvents();
                        FM.GetSRP().LoadOfficeManager(CurrentRow().SRPID);
                        FM.GetSRP().GenSrp(CurrentRow().SRPID);
                        FM.GetSRP().SubmitSrp(CurrentRow().SRPID);
                        FileForm().ReloadFileData();
                        MessageBox.Show("Your SRP was successfully submitted.");
                        Application.UseWaitCursor = false;
                    }
                    break;

                case "cmdRollbackSRP":
                    if (MessageBox.Show("This will undo the submitting of this SRP.\n\nAre you sure you want to perform this operation?", "Undo Submit of SRP", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                    {
                        Application.UseWaitCursor = true;
                        Application.DoEvents();
                        FM.GetSRP().RollbackSRP(CurrentRow());
                        FileForm().ReloadFileData();
                        MessageBox.Show("The selected SRP was successfully rolled back.");
                        Application.UseWaitCursor = false;
                    }

                    MessageBox.Show("The selected SRP was rolled back.");
                    break;

                case "tsGoToSRPDetail":
                    FileForm().MoreInfo("srpdetail", CurrentRow().SRPID);
                    break;

                case "tsGoToBillingReview":
                    FileForm().MoreInfo("billingreview", CurrentRow().SRPID);
                    break;
                }
                FileForm().HandleACSMenu(e, CurrentRow());
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Exemple #25
0
        protected override void BeforeChange(DataColumn dc, DataRow ddr)
        {
            string ObjectName = this.mySRPDT.TableName;

            atriumDB.SRPRow dr = (atriumDB.SRPRow)ddr;
            switch (dc.ColumnName)
            {
            case "SRPDate":
                if (dr.IsSRPDateNull())
                {
                    throw new RequiredException(Resources.SRPSRPDate);
                }
                this.myA.IsValidDate(Resources.SRPSRPDate, dr.SRPDate, false, DebtorBE.CSLBegin, DateTime.Today.AddYears(30), Resources.ValidationCSLBegin, Resources.ValidationThirtyYearsLater);
                if (this.myA.IsFieldChanged(dc, dr))
                {
                    if (!dr.IsSRPSubmittedDateNull())
                    {
                        throw new AtriumException(Resources.SRPDateChangeNotAllowed);
                    }
                }
                break;

            case "SRPSubmittedDate":
                if (!dr.IsSRPSubmittedDateNull())
                {
                    //	this.myA.RaiseError((int)AtriumEnum.AppErrorCodes.CannotBeBlank, myA.GetLabelLeft(ObjectName, dc.ColumnName));
                    if (dr.IsSRPDateNull())
                    {
                        throw new RelatedException(Resources.SRPSRPSubmittedDate, Resources.SRPSRPDate);
                    }
                    this.myA.IsValidDate(Resources.SRPSRPSubmittedDate, dr.SRPSubmittedDate, true, dr.SRPDate, DateTime.Today, Resources.SRPSRPDate, Resources.ValidationToday);
                }
                break;

            case "SRPReceivedDate":
                if (dr.IsSRPReceivedDateNull())
                {
                    throw new RequiredException(Resources.SRPSRPReceivedDate);
                }
                if (myA.LeadOfficeMng.CurrentOffice.UsesBilling)
                {
                    if (dr.IsSRPSubmittedDateNull())
                    {
                        throw new RelatedException(Resources.SRPSRPReceivedDate, Resources.SRPSRPSubmittedDate);
                    }
                    myA.IsValidDate(Resources.SRPSRPReceivedDate, dr.SRPReceivedDate, true, dr.SRPSubmittedDate, DateTime.Today, Resources.SRPSRPReceivedDate, Resources.ValidationToday);
                }
                else
                {
                    if (dr.IsSRPDateNull())
                    {
                        throw new RelatedException(Resources.SRPSRPReceivedDate, Resources.SRPSRPDate);
                    }
                    myA.IsValidDate(Resources.SRPSRPReceivedDate, dr.SRPReceivedDate, true, dr.SRPDate, DateTime.Today, Resources.SRPSRPDate, Resources.ValidationToday);
                }
                break;

            case "TaxationBegan":
                if (dr.IsTaxationBeganNull())
                {
                    throw new RequiredException(Resources.SRPTaxationBegan);
                }
                if (myA.LeadOfficeMng.CurrentOffice.UsesBilling)
                {
                    if (dr.IsSRPSubmittedDateNull())
                    {
                        throw new RelatedException(Resources.SRPTaxationBegan, Resources.SRPSRPSubmittedDate);
                    }
                    myA.IsValidDate(Resources.SRPTaxationBegan, dr.TaxationBegan, true, dr.SRPSubmittedDate, DateTime.Today, Resources.SRPSRPSubmittedDate, Resources.ValidationToday);
                }
                else
                {
                    if (dr.IsSRPReceivedDateNull())
                    {
                        throw new RelatedException(Resources.SRPTaxationBegan, Resources.SRPSRPReceivedDate);
                    }
                    myA.IsValidDate(Resources.SRPTaxationBegan, dr.TaxationBegan, true, dr.SRPReceivedDate, DateTime.Today, Resources.SRPSRPReceivedDate, Resources.ValidationToday);
                }
                break;

            case "TaxationCompleted":
                if (dr.IsTaxationCompletedNull())
                {
                    throw new RequiredException(Resources.SRPTaxationCompleted);
                }
                if (dr.IsTaxationBeganNull())
                {
                    throw new RelatedException(Resources.SRPTaxationCompleted, Resources.SRPTaxationBegan);
                }
                myA.IsValidDate(Resources.SRPTaxationCompleted, dr.TaxationCompleted, true, dr.TaxationBegan, DateTime.Today, Resources.SRPTaxationBegan, Resources.ValidationToday);

                //check to see that all taxation records have been taxed
                if (!isAllIRPsTaxed(dr))
                {
                    throw new AtriumException(Resources.SRPIRPNotTaxed);
                }

                break;

            case "OfficeID":
                break;

            case "SRPID":
                break;

            default:
                //myA.RaiseError((int)AtriumEnum.AppErrorCodes.SRPReadOnly);
                break;
            }
        }
Exemple #26
0
 public void LoadOfficeManager(int srpId)
 {
     atriumDB.SRPRow sr = Load(srpId);
     //JLL: is this even needed?  all references to this method come from batchBE ... should we look to ensure FM is loaded instead?
     myA.LeadOfficeMng.GetOffice(sr.OfficeID);
 }
Exemple #27
0
        public override void ApplySecurity(DataRow srpRow) //SRP
        {
            if (srpRow == null)
            {
                return;
            }

            atriumDB.SRPRow srpr = (atriumDB.SRPRow)srpRow;

            UIHelper.EnableCommandBarCommand(cmdNew, FM.GetSRP().CanAdd(FM.CurrentFile.FileId));
            UIHelper.EnableCommandBarCommand(cmdDelete, false);
            cmdRollbackSRP.Enabled = Janus.Windows.UI.InheritableBoolean.False;

            //Online agent
            if (myOfficeMan.CurrentOffice.UsesBilling)
            {
                if (srpr.IsCountOfTaxationNull() || srpr.CountOfTaxation == 0)
                {
                    tsGoToSRPDetail.Enabled     = Janus.Windows.UI.InheritableBoolean.False;
                    tsGoToBillingReview.Enabled = Janus.Windows.UI.InheritableBoolean.False;
                }
                else
                {
                    tsGoToSRPDetail.Enabled     = Janus.Windows.UI.InheritableBoolean.True;
                    tsGoToBillingReview.Enabled = Janus.Windows.UI.InheritableBoolean.True;
                }

                tsExportDisb.Enabled = Janus.Windows.UI.InheritableBoolean.True;
                tsExportFees.Enabled = Janus.Windows.UI.InheritableBoolean.True;

                sRPDateCalendarCombo.ReadOnly           = true;
                sRPDateCalendarCombo.BackColor          = SystemColors.Control;
                sRPSubmittedDateCalendarCombo.ReadOnly  = true;
                sRPSubmittedDateCalendarCombo.BackColor = SystemColors.Control;
                sRPReceivedDateCalendarCombo.ReadOnly   = true;
                sRPReceivedDateCalendarCombo.BackColor  = SystemColors.Control;
                taxationBeganCalendarCombo.ReadOnly     = true;
                taxationBeganCalendarCombo.BackColor    = SystemColors.Control;
                cmdSave.Enabled = Janus.Windows.UI.InheritableBoolean.False;

                //Taxation is completed
                if (!srpr.IsTaxationCompletedNull())
                {
                    sRPDateCalendarCombo.BackColor           = SystemColors.Control;
                    taxationCompletedCalendarCombo.ReadOnly  = true;
                    taxationCompletedCalendarCombo.BackColor = SystemColors.Control;
                    tsGenSRP.Enabled    = Janus.Windows.UI.InheritableBoolean.False;
                    tsSubmitSRP.Enabled = Janus.Windows.UI.InheritableBoolean.False;
                    tsImport.Enabled    = Janus.Windows.UI.InheritableBoolean.False;
                }
                else
                {
                    //SRP is submitted
                    if (!srpr.IsSRPSubmittedDateNull())
                    {
                        tsImport.Enabled     = Janus.Windows.UI.InheritableBoolean.False;
                        tsExportDisb.Enabled = Janus.Windows.UI.InheritableBoolean.True;

                        tsGenSRP.Enabled    = Janus.Windows.UI.InheritableBoolean.False;
                        tsSubmitSRP.Enabled = Janus.Windows.UI.InheritableBoolean.False;

                        if (srpr.IsTaxationCompletedNull() && FM.AtMng.SecurityManager.CanExecute(0, atSecurity.SecurityManager.Features.SysAdmin) == atSecurity.SecurityManager.ExPermissions.Yes)
                        {
                            cmdRollbackSRP.Enabled = Janus.Windows.UI.InheritableBoolean.True;
                        }

                        //who is looking at the data?

                        //CLAS
                        if ((FM.AtMng.WorkingAsOfficer.OfficeId == FM.CurrentFile.OwnerOfficeId || FM.AtMng.SecurityManager.CanExecute(0, atSecurity.SecurityManager.Features.SysAdmin) == atSecurity.SecurityManager.ExPermissions.Yes))
                        {
                            sRPReceivedDateCalendarCombo.ReadOnly  = false;
                            sRPReceivedDateCalendarCombo.BackColor = SystemColors.Window;
                            if (!srpr.IsTaxationBeganNull())
                            {
                                taxationCompletedCalendarCombo.ReadOnly  = false;
                                taxationCompletedCalendarCombo.BackColor = SystemColors.Window;
                            }
                            cmdSave.Enabled = Janus.Windows.UI.InheritableBoolean.True;
                        }
                        else
                        {
                            taxationCompletedCalendarCombo.ReadOnly  = true;
                            taxationCompletedCalendarCombo.BackColor = SystemColors.Control;
                            sRPReceivedDateCalendarCombo.ReadOnly    = true;
                            sRPReceivedDateCalendarCombo.BackColor   = SystemColors.Control;
                        }
                    }
                    else
                    {
                        //SRP is not committed

                        tsImport.Enabled     = Janus.Windows.UI.InheritableBoolean.True;
                        tsExportDisb.Enabled = Janus.Windows.UI.InheritableBoolean.False;

                        sRPReceivedDateCalendarCombo.ReadOnly    = true;
                        sRPReceivedDateCalendarCombo.BackColor   = SystemColors.Control;
                        taxationCompletedCalendarCombo.ReadOnly  = true;
                        taxationCompletedCalendarCombo.BackColor = SystemColors.Control;
                        if (FM.AtMng.WorkingAsOfficer.OfficeId == FM.CurrentFile.LeadOfficeId || FM.AtMng.WorkingAsOfficer.OfficeId == FM.CurrentFile.OwnerOfficeId)
                        {
                            tsGenSRP.Enabled = Janus.Windows.UI.InheritableBoolean.True;
                        }
                        else
                        {
                            tsGenSRP.Enabled = Janus.Windows.UI.InheritableBoolean.False;
                        }
                        //Can't commit yet
                        if (srpr.SRPDate < DateTime.Today && FM.AtMng.WorkingAsOfficer.OfficeId == FM.CurrentFile.LeadOfficeId)
                        {
                            tsSubmitSRP.Enabled = Janus.Windows.UI.InheritableBoolean.True;
                        }
                        else
                        {
                            tsSubmitSRP.Enabled = Janus.Windows.UI.InheritableBoolean.False;
                        }
                    }
                }
            }

            //Non-online agent (ad-hoc or foreign)
            else
            {
                sRPSubmittedDateLabel.Visible         = false;
                sRPSubmittedDateCalendarCombo.Visible = false;
                tsGoToBillingReview.Enabled           = Janus.Windows.UI.InheritableBoolean.False;
                tsExportDisb.Enabled   = Janus.Windows.UI.InheritableBoolean.False;
                tsExportFees.Enabled   = Janus.Windows.UI.InheritableBoolean.False;
                tsExternalData.Enabled = Janus.Windows.UI.InheritableBoolean.False;
                tsGenSRP.Enabled       = Janus.Windows.UI.InheritableBoolean.False;
                tsSubmitSRP.Enabled    = Janus.Windows.UI.InheritableBoolean.False;

                UIHelper.EnableCommandBarCommand(cmdDelete, srpr.RowState != DataRowState.Added);
                UIHelper.EnableCommandBarCommand(cmdNew, srpr.RowState != DataRowState.Added);
                UIHelper.EnableCommandBarCommand(tsGoToSRPDetail, srpr.RowState != DataRowState.Added);
                cmdSave.Enabled = Janus.Windows.UI.InheritableBoolean.True;

                sRPDateCalendarCombo.ReadOnly            = false;
                sRPDateCalendarCombo.BackColor           = SystemColors.Window;
                sRPReceivedDateCalendarCombo.ReadOnly    = false;
                sRPReceivedDateCalendarCombo.BackColor   = SystemColors.Window;
                taxationBeganCalendarCombo.ReadOnly      = false;
                taxationBeganCalendarCombo.BackColor     = SystemColors.Window;
                taxationCompletedCalendarCombo.ReadOnly  = false;
                taxationCompletedCalendarCombo.BackColor = SystemColors.Window;

                if (FM.AtMng.SecurityManager.CanExecute(0, atSecurity.SecurityManager.Features.Atrium) == atSecurity.SecurityManager.ExPermissions.No)
                {
                    sRPReceivedDateCalendarCombo.ReadOnly    = true;
                    sRPReceivedDateCalendarCombo.BackColor   = SystemColors.Control;
                    sRPDateCalendarCombo.ReadOnly            = true;
                    sRPDateCalendarCombo.BackColor           = SystemColors.Control;
                    taxationBeganCalendarCombo.ReadOnly      = true;
                    taxationBeganCalendarCombo.BackColor     = SystemColors.Control;
                    taxationCompletedCalendarCombo.ReadOnly  = true;
                    taxationCompletedCalendarCombo.BackColor = SystemColors.Control;
                    cmdNew.Enabled    = Janus.Windows.UI.InheritableBoolean.False;
                    cmdDelete.Enabled = Janus.Windows.UI.InheritableBoolean.False;
                }
            }
        }