protected void Button1_Click(object sender, EventArgs e)
        {
            Utils.IsAuthorized("Guarantors", "Create");
                using (FinanceManagerDataContext db = new FinanceManagerDataContext())
                {
                    CurrentGuarantorber = new Guarantor()
                    {
                        GuarantorFirstName = MemberFirstNameTextBox.Text,
                        GuarantorLastName = MemberLastNameTextBox.Text,
                        Address = MemberResidentialTextBox.Text,
                        BusinessAddress = MemberBusinessLocationTextBox.Text,
                        CreatedBy = HttpContext.Current.User.Identity.Name,
                       // DOB = MemberDOBNameTextBox.Text,
                        Telephone = MemberTelTextBox.Text,
                        IdentityNumber = MemberIDNumberTextBox.Text,
                        IdentityTypeID = Convert.ToInt32(DropDownList1.SelectedValue)
                    };

                    CurrentGuarantorber.GuarantorPhoto = FileUpload1.FileBytes;
            //DateWebUserControl1.DtSelectedDate;
                    CurrentGuarantorber.DOB = DateWebUserControl1.DtSelectedDate;// Convert.ToDateTime(MemberDOBNameTextBox.Text);
                    CurrentGuarantorber.Fax = MemberFaxTextBox0.Text;
                    CurrentGuarantorber.IdentityNumber = MemberIDNumberTextBox.Text;
                    CurrentGuarantorber.Mobile = MemberMobileTextBox.Text;
                    CurrentGuarantorber.ResidentialAddress = MemberResidentialTextBox.Text;
                    CurrentGuarantorber.Telephone = MemberTelTextBox.Text;
                    CurrentGuarantorber.IdentityTypeID = Convert.ToInt32(DropDownList1.SelectedValue);
                    // CurrentGuarantorber.ContactPerson = MemberContactPersonTextBox.Text;

                    db.Guarantors.InsertOnSubmit(CurrentGuarantorber);
                    db.SubmitChanges();

                    txtResult.Text = CurrentGuarantorber.GuarantorId.ToString();

                    string url = "";
                    if (Request.QueryString["lid"] != null)
                    {
                        url = "&lid=" + Request.QueryString["lid"];
                    }
                    Response.Redirect(Request.QueryString["redirectUrl"] + "&mid=" + Request.QueryString["mid"] + url + "&gtId=" + CurrentGuarantorber.GuarantorId);
                    //ClientScript.RegisterStartupScript(typeof(Page), "SymbolError","GetRowValue(" + CurrentGuarantorber.GuarantorId + ");", true);
                }
            //}

            //}
            //if (Request.QueryString["RedirectUrl"] == null)
            //{
            //    Response.Redirect("Members.aspx");
            //}
            //else
            //{
            //    Response.Redirect(Request.QueryString["RedirectUrl"]+"?mid=" + CurrentMember.MemberId);
            //}
        }
 partial void DeleteGuarantor(Guarantor instance);
 partial void UpdateGuarantor(Guarantor instance);
 partial void InsertGuarantor(Guarantor instance);