コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Visible && !IsPostBack)
     {
         SaveContactPhone = ContactPhone.GetPhoneNumbersByContactID(ContactID);
         BuildPhoneList();
     }
 }
コード例 #2
0
        protected void gvPhone_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            gvPhone.EditIndex = -1;

            ContactPhone phone = ContactPhone.getPhoneByID(Int32.Parse(e.Keys[0].ToString()));

            phone.Delete();

            SaveContactPhone = ContactPhone.GetPhoneNumbersByContactID(ContactID);
            BuildPhoneList();
        }
コード例 #3
0
        protected void gvPhone_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            gvPhone.EditIndex = -1;

            ContactPhone phone = ContactPhone.getPhoneByID(Int32.Parse(e.Keys[0].ToString()));

            phone.PhoneNumber = (String)e.NewValues[0];
            phone.ContactID   = ContactID;
            phone.Save();

            SaveContactPhone = ContactPhone.GetPhoneNumbersByContactID(ContactID);
            BuildPhoneList();
        }