Esempio n. 1
0
        protected void btnSavePhone_Click(object sender, EventArgs e)
        {
            int iPhoneNumberID;

            if (int.TryParse(hidEnterPhoneID.Value, out iPhoneNumberID))
            {
                Classes.cPhone UpdatePhone = new Classes.cPhone(iPhoneNumberID, Master.UserID, Master.UserName);
                UpdatePhone.PhoneNumberID = iPhoneNumberID;
                UpdatePhone.AreaCode      = tbEnterAreaCode.Text;
                UpdatePhone.PhoneNumber   = tbEnterPhoneNumber.Text;
                UpdatePhone.Extension     = tbEnterExtension.Text;
                UpdatePhone.IsPrimary     = cbxEnterPrimary.Checked;

                int iTemp;
                if (int.TryParse(ddlEnterPhoneType.SelectedValue, out iTemp))
                {
                    UpdatePhone.PhoneTypeID = iTemp;
                }
                if (int.TryParse(ddlEnterProvider.SelectedValue, out iTemp))
                {
                    UpdatePhone.ProviderID = iTemp;
                }

                UpdatePhone.SaveUpdate(Master.UserID);
            }
        }
Esempio n. 2
0
        protected void btnDeletePhone_Click(object sender, EventArgs e)
        {
            int iPhoneNumberID;

            if (int.TryParse(hidDeletePhoneID.Value, out iPhoneNumberID))
            {
                Classes.cPhone UpdatePhone = new Classes.cPhone(iPhoneNumberID, Master.UserID, Master.UserName);
                UpdatePhone.SaveUpdate(Master.UserID, true);
            }
        }