示例#1
0
 public void ApplyDetailSecurity(DataRow dr)
 {
     if (dr != null)
     {
         CLAS.CompOfferDetailRow cbr = (CLAS.CompOfferDetailRow)dr;
         UIHelper.EnableControls(atriumDB_CompOfferDetailDataTableBindingSource, FM.GetCLASMng().GetCompOfferDetail().CanEdit(cbr));
     }
 }
示例#2
0
 private void atriumDB_CompOfferDetailDataTableBindingSource_CurrentChanged(object sender, EventArgs e)
 {
     try
     {
         CLAS.CompOfferDetailRow cbr = CurrentRowDetail();
         ApplyDetailSecurity(cbr);
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
示例#3
0
        public override bool CanDelete(DataRow dr)
        {
            bool ok = false;

            CLAS.CompOfferDetailRow fo = (CLAS.CompOfferDetailRow)dr;
            atSecurity.SecurityManager.LevelPermissions perm = myA.AtMng.SecurityManager.CanDelete(fo.CompOfferRow.FileID, atSecurity.SecurityManager.Features.CompOfferDetail);
            if (perm != atSecurity.SecurityManager.LevelPermissions.No)
            {
                ok = true;
            }

            return(ok);
        }
示例#4
0
        private void MyXml(CLAS.CompOfferRow r, System.Xml.XmlDocument xd)
        {
            System.Xml.XmlElement xe = (System.Xml.XmlElement)xd.SelectSingleNode("//toc[@type='compoffer' and @id=" + r.CompOfferId.ToString() + "]");
            if (xe == null)
            {
                xe = xd.CreateElement("toc");
                xe.SetAttribute("type", "compoffer");
            }
            xe.SetAttribute("id", r.CompOfferId.ToString());

            CLAS.CompOfferDetailRow cor = myA.DB.CompOfferDetail.FindByCompOfferDetailId(r.CurrentOfferId);
            string title = "";

            if (r.Active)
            {
                title = cor.CompOfferDate.ToString("yyyy/MM/dd") + ": " + cor.CompOfferAmount.ToString("C");
            }
            else
            {
                if (!r.IsTermsDefaultedDateNull())
                {
                    title = "Terms Defaulted: " + r.TermsDefaultedDate.ToString("yyyy/MM/dd");
                }
                else if (!r.IsTermsFulfilledDateNull())
                {
                    title = "Terms Fulfilled: " + r.TermsFulfilledDate.ToString("yyyy/MM/dd");
                }
                else
                {
                    title = cor.CompOfferDate.ToString("yyyy/MM/dd") + ": Inactive";
                }
            }
            xe.SetAttribute("titlee", title);
            xe.SetAttribute("titlef", title);

            if (xe.ParentNode == null)
            {
                System.Xml.XmlElement xes = EFileBE.XmlAddFld(xd, "compoffer", "Compromise Offers", "Offres de règlement", 229);
                xes.AppendChild(xe);
            }
        }
示例#5
0
        protected override void AfterAdd(DataRow row)
        {
            CLAS.CompOfferDetailRow dr = (CLAS.CompOfferDetailRow)row;

            dr.CompOfferDetailId = this.myA.AtMng.PKIDGet("CompOfferDetail", 1);
            dr.FileId            = myA.FM.CurrentFileId;
            dr.CompOfferAmount   = 0;
            dr.InitiatedByDebtor = false;
            dr.LumpSum           = false;

            //jll: update current compofferdetail to reflect it is refused/rejected.
            //jll: updating current offer id on parent compoffer row
            CLAS.CompOfferRow cor = (CLAS.CompOfferRow)myA.GetCompOffer().GetCurrentRow()[0];
            if (myCompOfferDetailDT.Count > 1)
            {
                CLAS.CompOfferDetailRow[] codr = (CLAS.CompOfferDetailRow[])myCompOfferDetailDT.Select("CompOfferDetailId=" + cor.CurrentOfferId);
                if (codr[0] != null)
                {
                    codr[0].RefusedDate = DateTime.Today;
                }
            }
            cor.CurrentOfferId = dr.CompOfferDetailId;
        }