コード例 #1
0
        private void MyXml(CLAS.JudgmentRow jr, System.Xml.XmlDocument xd)
        {
            if (jr.ProcessTypeCode != "TP")
            {
                System.Xml.XmlElement xe = (System.Xml.XmlElement)xd.SelectSingleNode("//toc[@type='judgment' and @id=" + jr.JudgmentID.ToString() + "]");
                if (xe == null)
                {
                    xe = xd.CreateElement("toc");
                    xe.SetAttribute("type", "judgment");
                }
                xe.SetAttribute("id", jr.JudgmentID.ToString());
                string title           = "";
                bool   isTextStruckout = false;
                if (!jr.IsActionNumberNull())
                {
                    title += jr.ActionNumber;
                }

                if (!jr.IsWithdrawalRemovalDateNull())
                {
                    isTextStruckout = true;
                    string withdrawnTooltipE = "Judgment Withdrawal/Removal Date: " + jr.WithdrawalRemovalDate.ToString("yyyy/MM/dd");
                    string withdrawnTooltipF = "Jugement retiré le : " + jr.WithdrawalRemovalDate.ToString("yyyy/MM/dd");

                    xe.SetAttribute("tooltipe", withdrawnTooltipE);
                    xe.SetAttribute("tooltipf", withdrawnTooltipF);
                    title += " (" + Properties.Resources.JudgmentJudgmentDate + " " + jr.JudgmentDate.ToString("yyyy/MM/dd") + ")";
                }
                else if (!jr.IsJudgmentDateNull())
                {
                    title += " (" + Properties.Resources.JudgmentJudgmentDate + " " + jr.JudgmentDate.ToString("yyyy/MM/dd") + ")";
                }
                else if (!jr.IsDefenceDateNull())
                {
                    title += " (" + Properties.Resources.JudgmentDefenceDate + " " + jr.DefenceDate.ToString("yyyy/MM/dd") + ")";
                }
                else if (!jr.IsStatementofClaimServedDateNull())
                {
                    title += " (" + Properties.Resources.JudgmentStatementofClaimServedDate + " " + jr.StatementofClaimServedDate.ToString("yyyy/MM/dd") + ")";
                }
                else if (!jr.IsStatementofClaimIssuedDateNull())
                {
                    title += " (" + Properties.Resources.JudgmentStatementofClaimIssuedDate + " " + jr.StatementofClaimIssuedDate.ToString("yyyy/MM/dd") + ")";
                }


                xe.SetAttribute("titlee", title);
                xe.SetAttribute("titlef", title);
                xe.SetAttribute("strikeout", isTextStruckout.ToString().ToLower());



                if (xe.ParentNode == null)
                {
                    System.Xml.XmlElement xes = EFileBE.XmlAddFld(xd, "judgment", "Litigation", "Litige", 250);
                    xes.AppendChild(xe);
                }
            }
        }
コード例 #2
0
        protected override void BeforeChange(DataColumn dc, DataRow ddr)
        {
            string ObjectName = this.myJudgmentDT.TableName;

            CLAS.JudgmentRow dr = (CLAS.JudgmentRow)ddr;
            switch (dc.ColumnName)
            {
            case "JudgmentID":
                //					if CLng(vNewValue) <> mrst(dc.ColumnName))
                //						Me.Find vNewValue
                //					End If
                break;

            case "ActionNumber":
                if (dr.IsActionNumberNull())
                {
                    throw new RequiredException(atriumBE.Properties.Resources.JudgmentActionNumber);
                }
                break;

            case "JudgmentCourtLevelCode":
                if (dr.IsJudgmentCourtLevelCodeNull())
                {
                    throw new RequiredException(atriumBE.Properties.Resources.JudgmentJudgmentCourtLevelCode);
                }
                else if (!myA.CheckDomain(dr.JudgmentCourtLevelCode, myA.FM.Codes("JudgmentCourtLevel")))
                {
                    throw new AtriumException(atriumBE.Properties.Resources.BadDomainValue, dc.ColumnName, dr.Table.TableName, "Judgment Court Level");
                }
                break;

            case "OfficeID":
                if (dr.IsOfficeIDNull())
                {
                    throw new RequiredException(atriumBE.Properties.Resources.JudgmentOfficeID);
                }
                else if (!myA.CheckDomain(dr.OfficeID, myA.FM.Codes("officelist")))
                {
                    throw new AtriumException(atriumBE.Properties.Resources.BadDomainValue, dc.ColumnName, dc.Table.TableName, "Office List");
                }
                break;

            case "StatementofClaimIssuedDate":
                if (dr.IsStatementofClaimIssuedDateNull())
                {
                    throw new RequiredException(atriumBE.Properties.Resources.JudgmentStatementofClaimIssuedDate);
                }
                myA.IsValidDate(atriumBE.Properties.Resources.JudgmentStatementofClaimIssuedDate, dr.StatementofClaimIssuedDate, false, DebtorBE.CSLBegin, DateTime.Today, atriumBE.Properties.Resources.ValidationCSLBegin, atriumBE.Properties.Resources.ValidationToday);
                break;

            case "StatementofClaimServedDate":
                if (dr.IsStatementofClaimServedDateNull() & !dr.IsDefenceDateNull())
                {
                    throw new RequiredException(atriumBE.Properties.Resources.JudgmentStatementofClaimServedDate);
                }
                if (!dr.IsStatementofClaimServedDateNull())
                {
                    if (dr.IsStatementofClaimIssuedDateNull())
                    {
                        throw new RelatedException(atriumBE.Properties.Resources.JudgmentStatementofClaimServedDate, atriumBE.Properties.Resources.JudgmentStatementofClaimIssuedDate);
                    }
                    this.myA.IsValidDate(atriumBE.Properties.Resources.JudgmentStatementofClaimServedDate, dr.StatementofClaimServedDate, true, dr.StatementofClaimIssuedDate, DateTime.Today, atriumBE.Properties.Resources.JudgmentStatementofClaimIssuedDate, atriumBE.Properties.Resources.ValidationToday);
                }
                break;

            case "DefenceDate":
                //2017-09-20 commented out ... otherwise we're saying: once you've provided value, you can't remove it.  odd rule.
                //if (dr.IsDefenceDateNull())
                //    throw new RequiredException(atriumBE.Properties.Resources.JudgmentDefenceDate);
                if (dr.IsStatementofClaimServedDateNull())
                {
                    throw new RelatedException(atriumBE.Properties.Resources.JudgmentDefenceDate, atriumBE.Properties.Resources.JudgmentStatementofClaimServedDate);
                }
                if (!dr.IsDefenceDateNull())
                {
                    myA.IsValidDate(atriumBE.Properties.Resources.JudgmentDefenceDate, dr.DefenceDate, true, dr.StatementofClaimServedDate, DateTime.Today, atriumBE.Properties.Resources.JudgmentStatementofClaimServedDate, atriumBE.Properties.Resources.ValidationToday);
                }
                break;

            case "ClaimAgainstCrown":
                if (dr.IsClaimAgainstCrownNull())
                {
                    throw new RequiredException(atriumBE.Properties.Resources.JudgmentClaimAgainstCrown);
                }
                if (dr.IsStatementofClaimIssuedDateNull())
                {
                    throw new RelatedException(atriumBE.Properties.Resources.JudgmentClaimAgainstCrown, atriumBE.Properties.Resources.JudgmentStatementofClaimIssuedDate);
                }
                myA.IsValidDate(atriumBE.Properties.Resources.JudgmentClaimAgainstCrown, dr.ClaimAgainstCrown, true, dr.StatementofClaimIssuedDate, DateTime.Today, atriumBE.Properties.Resources.JudgmentStatementofClaimIssuedDate, atriumBE.Properties.Resources.ValidationToday);
                break;

            case "JudgmentDate":
                if (dr.IsJudgmentDateNull())
                {
                    throw new RequiredException(atriumBE.Properties.Resources.JudgmentJudgmentDate);
                }
                if (!dr.IsStatementofClaimIssuedDateNull())
                {
                    myA.IsValidDate(atriumBE.Properties.Resources.JudgmentJudgmentDate, dr.JudgmentDate, true, dr.StatementofClaimIssuedDate, DateTime.Today, atriumBE.Properties.Resources.JudgmentStatementofClaimIssuedDate, atriumBE.Properties.Resources.ValidationToday);
                }
                else
                {
                    myA.IsValidDate(atriumBE.Properties.Resources.JudgmentJudgmentDate, dr.JudgmentDate, true, DebtorBE.CSLBegin, DateTime.Today, atriumBE.Properties.Resources.ValidationCSLBegin, atriumBE.Properties.Resources.ValidationToday);
                }
                break;

            case "JudgmentLPDate":
                if (dr.IsJudgmentLPDateNull())
                {
                    throw new RequiredException(atriumBE.Properties.Resources.JudgmentJudgmentLPDate);
                }
                if (dr.IsJudgmentDateNull())
                {
                    throw new RelatedException(atriumBE.Properties.Resources.JudgmentJudgmentLPDate, atriumBE.Properties.Resources.JudgmentJudgmentDate);
                }
                this.myA.IsValidDate(atriumBE.Properties.Resources.JudgmentJudgmentLPDate, dr.JudgmentLPDate, true, dr.JudgmentDate, DateTime.Today.AddYears(30), atriumBE.Properties.Resources.JudgmentJudgmentDate, atriumBE.Properties.Resources.ValidationThirtyYearsLater);
                break;

            case "JudgmentTypeCode":
                if (!myA.CheckDomain(dr.JudgmentTypeCode, myA.FM.Codes("JudgmentType")))
                {
                    throw new AtriumException(atriumBE.Properties.Resources.BadDomainValue, dc.ColumnName, dr.Table.TableName, "Judgment Type");
                }
                break;

            case "ProcessTypeCode":
                if (!myA.CheckDomain(dr.ProcessTypeCode, myA.FM.Codes("ProcessType")))
                {
                    throw new AtriumException(atriumBE.Properties.Resources.BadDomainValue, dc.ColumnName, dr.Table.TableName, "Legal Process Type");
                }
                break;

            default:
                break;
            }
        }