Ejemplo n.º 1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        //Thread.Sleep(30000);
        DO_Registrationdetails objdoreg = new DO_Registrationdetails();
        DA_Registrationdetails objdareg = new DA_Registrationdetails();
        string ip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];

        if (ip == null)
        {
            ip = Request.ServerVariables["REMOTE_ADDR"];
        }

        if (Convert.ToString(ViewState["Cropfilename"]) != null && Convert.ToString(ViewState["Cropfilename"]) != "")
        {
            objdoreg.PhotoPath = Convert.ToString(ViewState["Cropfilename"]);
        }
        else if (Convert.ToString(ViewState["filename"]) != null && Convert.ToString(ViewState["filename"]) != "")
        {
            objdoreg.PhotoPath = Convert.ToString(ViewState["filename"]);
        }
        else
        {
            return;
        }

        objdoreg.IpAddress      = ip;
        objdoreg.RegistrationId = Convert.ToInt32(Session["ExternalUserId"]);
        objdareg.AddEditDel_Profile(objdoreg, DA_Registrationdetails.RegistrationDetails.UpdateImg);
        Response.Redirect("~/Home.aspx?ActiveStatus=P");
    }
Ejemplo n.º 2
0
    private void activate()
    {
        if (Convert.ToInt32(ViewState["RegOutId"]) != 0)
        {
            objRegistration.RegistrationId = Convert.ToInt32(ViewState["RegOutId"]);
        }

        objRegistrationDB.AddEditDel_Profile(objRegistration, DA_Registrationdetails.RegistrationDetails.InstituteNameStuProfList);
    }
Ejemplo n.º 3
0
    private void activate()
    {
        DataTable dtReq = new DataTable();

        if (Convert.ToInt32(ViewState["RegOutId"]) != 0)
        {
            objRegistration.RegistrationId = Convert.ToInt32(ViewState["RegOutId"]);
        }

        objRegistrationDB.AddEditDel_Profile(objRegistration, DA_Registrationdetails.RegistrationDetails.InstituteNameStuProfList);

        dtReq = objRegistrationDB.GetDataTable(objRegistration, DA_Registrationdetails.RegistrationDetails.SingleRecord);

        SendMail(dtReq.Rows[0]["vchrUserName"].ToString());
    }
Ejemplo n.º 4
0
    protected void lnkProfileSave_click(object sender, EventArgs e)
    {
        string ip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];

        if (ip == null)
        {
            ip = Request.ServerVariables["REMOTE_ADDR"];
        }

        //Update user details.
        objdoreg.RegistrationId = Convert.ToInt32(ViewState["UserID"]);
        objdoreg.ModifiedBy     = Convert.ToInt32(ViewState["UserID"]);
        if (txtName.Text.Trim() == "")
        {
            lblProfilemsg.Text = "Please enter name.";
            return;
        }

        if (txtName.Text.Trim() == "")
        {
            lblProfilemsg.Text = "Please enter name.";
            return;
        }

        string name = txtName.Text.Trim();

        string[] ssize = name.Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);

        if (ssize.Count() > 2)
        {
            if (ssize.Count() > 3)
            {
                objdoreg.FirstName = ssize[0] + " " + ssize[1] + " " + ssize[2];
                objdoreg.LastName  = ssize[3];
            }
            else
            {
                objdoreg.FirstName = ssize[0] + " " + ssize[1];
                objdoreg.LastName  = ssize[2];
            }
        }
        else
        {
            objdoreg.FirstName = ssize[0];
            objdoreg.LastName  = ssize[1];
        }

        if (txtGender.Text == "Male" || txtGender.Text == "male")
        {
            objdoreg.Sex = "M";
        }
        else if (txtGender.Text == "Female" || txtGender.Text == "female")
        {
            objdoreg.Sex = "F";
        }

        if (txtPhone.Text.Trim() != "")
        {
            objdoreg.Mobile = Convert.ToInt64(txtPhone.Text.Trim());
        }

        objdoreg.Languages = txtLanguage.Text.Trim().Replace("'", "''");
        objdoreg.IpAddress = ip;
        objdareg.AddEditDel_Profile(objdoreg, DA_Registrationdetails.RegistrationDetails.Update);
        divEditProfile.Style.Add("display", "none");
        GetProfileDetails(Convert.ToInt32(ViewState["UserID"]));
        lblProfilemsg.Text = "";
    }