Exemple #1
0
        protected void URLPopUpControlAddSaleCustomer_OnBeforePopUpOpened(object sender, EventArgs e)
        {
            SaveDataIntoDataItemFromControls();

            // create a new ledger and show this as a popup
            Relation NewRel = new Relation();

            NewRel.CustomerType = "Debtor";

            ControlObjectContext.AddToRelationSet(NewRel);
            ControlObjectContext.SaveChanges(SaveOptions.DetectChangesBeforeSave);

            URLPopUpControlAddSaleCustomer.URLToPopup = "webformpopup.aspx?uc=CustomerRelation&Id=" + NewRel.Id.ToString();
        }