//Create user starts
SqlParameter[] spar = new SqlParameter[12];
spar[0] = new SqlParameter("@UserEmail", txtEmailAddrRegis.Text.Trim());
spar[1] = new SqlParameter("@Password", txtPasswordRegis.Text.Trim());
spar[2] = new SqlParameter("@Name", txtNameRegis.Text.Trim());
spar[3] = new SqlParameter("@Country", app.getCurrentCountry());
spar[4] = new SqlParameter("@intRetVal", 0);
spar[4].Direction = ParameterDirection.Output;
spar[5] = new SqlParameter("@LastName", txtLast.Text.Trim());
spar[6]=new SqlParameter("@City",txtCIty.Text.Trim());
spar[8]=new SqlParameter("@Zip",txtZip.Text.Trim());
spar[9]=new SqlParameter("@Contact",txtPhone.Text.Trim());
spar[10]=new SqlParameter("@Fax",txtFax.Text.Trim());
spar[11] = new SqlParameter("@Address", txtAddress.Text.Trim());
if (drpCntrySelFront.SelectedItem.Text == "India")
{
spar[7] = new SqlParameter("@State", dpdstate.SelectedItem.Text);
}
else
{
spar[7] = new SqlParameter("@State", txtState.Text.Trim());
}
sqlGet.executeNonQuery("[dbo].[UserCreate]", spar, CommandType.StoredProcedure);
if (Convert.ToString(spar[4].Value) == "0")
{
lblRegisterMsg.ForeColor = System.Drawing.Color.Red;
lblRegisterMsg.Text = "This Email address is already registered with us.";
}