Exemplo n.º 1
0
        protected override void AfterChange(DataColumn dc, DataRow ddr)
        {
            string ObjectName = this.myJudgmentDT.TableName;

            CLAS.JudgmentRow dr = (CLAS.JudgmentRow)ddr;
            switch (dc.ColumnName)
            {
            case "OfficeID":
            case "JudgmentDate":
                if (!dr.IsJudgmentDateNull() && !dr.IsOfficeIDNull())
                {
                    officeDB.OfficeRow drOffice = this.myA.AtMng.GetOffice(dr.OfficeID).CurrentOffice;
                    if (!drOffice.IsJudgmentLPNull())
                    {
                        dr.JudgmentLPDate = dr.JudgmentDate.AddYears(drOffice.JudgmentLP);
                    }
                    else
                    {
                        dr.JudgmentLPDate = dr.JudgmentDate.AddYears(10);
                    }


                    myA.FM.GetActivityBF().MaintainBFDate(dr.JudgmentID, "Judgment", "JUDGMENTLPDATE", dr.JudgmentLPDate);
                    dr.EndEdit();
                }
                break;

            case "JudgmentLPDate":
                myA.FM.GetActivityBF().MaintainBFDate(dr.JudgmentID, "Judgment", "JUDGMENTLPDATE", dr.JudgmentLPDate);
                break;

            case "SetJudgmentAccountDefaults":
                if (dr.SetJudgmentAccountDefaults)
                {
                    SetJudgmentAccountDefaultValues(dr);
                }
                break;

            default:
                break;
            }
        }
Exemplo n.º 2
0
        private void setOfficeTooltip(LinkLabel lnk, officeDB.OfficeRow or)
        {
            lnk.Text = or.OfficeCode;
            string address = "";

            if (!or.IsCityNull())
            {
                address = or.City;
            }
            if (!or.IsProvinceCodeNull())
            {
                if (address == "")
                {
                    address = or.ProvinceCode;
                }
                else
                {
                    address += ", " + or.ProvinceCode;
                }
            }
            if (!or.IsCountryCodeNull())
            {
                if (address == "")
                {
                    address = or.CountryCode;
                }
                else
                {
                    address += ", " + or.CountryCode;
                }
            }
            string addressLbl = address + Environment.NewLine;

            string tel      = "";
            string tollfree = "";
            string fax      = "";

            if (!or.IsWorkPhoneNull())
            {
                string tmp = or.WorkPhone;
                if (!or.IsWorkExtensionNull())
                {
                    tmp += " Ext. " + or.WorkExtension;
                }
                tel = Environment.NewLine + Properties.Resources.TocOfficeTKTelephone + tmp;
            }
            if (!or.IsHomePhoneNull())
            {
                tollfree = Environment.NewLine + Properties.Resources.TocOfficeTKTollFree + or.HomePhone;
            }

            if (!or.IsFaxNumberNull())
            {
                fax = Environment.NewLine + Properties.Resources.TocOfficeTKFax + or.FaxNumber;
            }


            string jlpvalue = "";

            if (!or.IsJudgmentLPNull()) //Judgment LP value exists, show it
            {
                jlpvalue = Environment.NewLine + Environment.NewLine + Properties.Resources.TocOfficeTKJudgLP + or.JudgmentLP.ToString() + Properties.Resources.TocOfficeTKyears;
            }

            string wlpvalue = "";

            if (!or.IsWritofExecutionLPNull()) //
            {
                wlpvalue = Environment.NewLine + Properties.Resources.TocOfficeTKWritLP + or.WritofExecutionLP.ToString() + Properties.Resources.TocOfficeTKyears;
            }


            Janus.Windows.Common.SuperTipSettings jstSettings1 = new Janus.Windows.Common.SuperTipSettings();
            jstSettings1.Image = Properties.Resources.office;
            if (fmCurrent.AtMng.AppMan.Language == "FRE")
            {
                jstSettings1.HeaderText = "(" + or.OfficeCode + ") " + or.OfficeNameFre;
            }
            else
            {
                jstSettings1.HeaderText = "(" + or.OfficeCode + ") " + or.OfficeName;
            }

            if (or.IsOnLine)
            {
                jstSettings1.FooterImage = Properties.Resources.atriumtrans16;
                jstSettings1.FooterText  = or.OfficeCode + Properties.Resources.TocOfficeTKusesAtrium;
            }

            jstSettings1.Text = addressLbl + tel + tollfree + fax + jlpvalue + wlpvalue;
            janusSuperTip1.SetSuperTip(lnk, jstSettings1);
        }