Exemplo n.º 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the AdjusterReferences EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToAdjusterReferences(AdjusterReference adjusterReference)
 {
     base.AddObject("AdjusterReferences", adjusterReference);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new AdjusterReference object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 public static AdjusterReference CreateAdjusterReference(global::System.Int32 id)
 {
     AdjusterReference adjusterReference = new AdjusterReference();
     adjusterReference.ID = id;
     return adjusterReference;
 }
Exemplo n.º 3
0
        protected void btnReferenceSave_Click(object sender, EventArgs e)
        {
            Page.Validate("Reference");
            if (!Page.IsValid)
                return;

            AdjusterReference adjusterReference = null;
            int adjusterID = Convert.ToInt32(hdId.Value);
            int referenceID = Convert.ToInt32(ViewState["ReferenceID"]);

            if (referenceID == 0)
                adjusterReference = new AdjusterReference();
            else
                adjusterReference = AdjusterReferenceManager.Get(referenceID);

            if (adjusterReference != null) {
                adjusterReference.AdjusterID = adjusterID;
                adjusterReference.CompanyName = txtReferenceCompanyName.Text;
                adjusterReference.Email = txtRefenreceEmail.Text;
                adjusterReference.Phone = txtRefenrecePhone.Text;
                adjusterReference.Position = txtReferencePosition.Text;
                adjusterReference.RereferenceName = txtRefenreceName.Text;

                try {
                    AdjusterReferenceManager.Save(adjusterReference);

                    showReferences();

                    bindReferences();
                }
                catch (Exception ex) {
                    Core.EmailHelper.emailError(ex);
                }
            }
        }