public void getAdmitRegistationDetail()
    {
        Session["UserImage"] = "";
        NameValueCollection objcollection11 = new NameValueCollection();

        objcls = new ClsKrisnAgr(strConnectionString);
        DataSet ds11 = new DataSet();

        objcollection11.Add("@TableId", Request.QueryString["Rid"].ToString());
        //objcollection11.Add("@Type", Session["Type"].ToString());
        ds11 = objcls.GetdataWithPera("selectStudentRegistration", objcollection11);
        if (ds11.Tables[0].Rows.Count > 0)
        {
            dr_Type.SelectedValue        = ds11.Tables[0].Rows[0]["Type"].ToString();
            txtStudentId.Text            = ds11.Tables[0].Rows[0]["ProfId"].ToString();
            txtName.Text                 = ds11.Tables[0].Rows[0]["Name"].ToString();
            dr_Graduatyear.SelectedValue = ds11.Tables[0].Rows[0]["GraduatedYear"].ToString();
            dr_course.SelectedValue      = ds11.Tables[0].Rows[0]["Course"].ToString();
            txtPhone.Text                = ds11.Tables[0].Rows[0]["Phone"].ToString();
            txtEmailId.Text              = ds11.Tables[0].Rows[0]["Email"].ToString();
            txtParmanaantaddress.Text    = ds11.Tables[0].Rows[0]["Address"].ToString();
            txtPossition.Text            = ds11.Tables[0].Rows[0]["Workposition"].ToString();
            ImgPersion.ImageUrl          = ds11.Tables[0].Rows[0]["Image"].ToString();
            Session["UserImage"]         = ds11.Tables[0].Rows[0]["Image"].ToString();
        }
    }
Пример #2
0
    public void getAdmitRegistationDetail()
    {
        NameValueCollection objcollection11 = new NameValueCollection();

        objcls = new ClsKrisnAgr(strConnectionString);
        DataSet ds11 = new DataSet();

        objcollection11.Add("@TableId", Session["TableId"].ToString());
        //objcollection11.Add("@Type", Session["Type"].ToString());
        ds11 = objcls.GetdataWithPera("selectStudentRegistration", objcollection11);
        if (ds11.Tables[0].Rows.Count > 0)
        {
            lblName.Text        = ds11.Tables[0].Rows[0]["Name"].ToString();
            lblEmail.Text       = ds11.Tables[0].Rows[0]["Email"].ToString();
            lblAddress.Text     = ds11.Tables[0].Rows[0]["Address"].ToString();
            lblPhone.Text       = ds11.Tables[0].Rows[0]["Phone"].ToString();
            lblUserName.Text    = ds11.Tables[0].Rows[0]["username"].ToString();
            lblPassword.Text    = ds11.Tables[0].Rows[0]["Password"].ToString();
            ImgProfile.ImageUrl = ds11.Tables[0].Rows[0]["Image"].ToString();
            lblCourse.Text      = ds11.Tables[0].Rows[0]["Course"].ToString();
            lblID.Text          = ds11.Tables[0].Rows[0]["ProfId"].ToString();
            lblType.Text        = ds11.Tables[0].Rows[0]["Type"].ToString();
            lblYear.Text        = ds11.Tables[0].Rows[0]["GraduatedYear"].ToString();
        }
    }
    public void getAdmitRegistationDetail()
    {
        Session["UserImage"] = "";
        NameValueCollection objcollection11 = new NameValueCollection();
        objcls = new ClsKrisnAgr(strConnectionString);
        DataSet ds11 = new DataSet();
        objcollection11.Add("@TableId", Request.QueryString["Rid"].ToString());
        //objcollection11.Add("@Type", Session["Type"].ToString());
        ds11 = objcls.GetdataWithPera("selectStudentRegistration", objcollection11);
        if (ds11.Tables[0].Rows.Count > 0)
        {

            dr_Type.SelectedValue = ds11.Tables[0].Rows[0]["Type"].ToString();
            txtStudentId.Text=ds11.Tables[0].Rows[0]["ProfId"].ToString();
            txtName.Text=ds11.Tables[0].Rows[0]["Name"].ToString();
            dr_Graduatyear.SelectedValue=ds11.Tables[0].Rows[0]["GraduatedYear"].ToString();
            dr_course.SelectedValue=ds11.Tables[0].Rows[0]["Course"].ToString();
            txtPhone.Text=ds11.Tables[0].Rows[0]["Phone"].ToString();
            txtEmailId.Text=ds11.Tables[0].Rows[0]["Email"].ToString();
            txtParmanaantaddress.Text=ds11.Tables[0].Rows[0]["Address"].ToString();
            txtPossition.Text=ds11.Tables[0].Rows[0]["Workposition"].ToString();
            ImgPersion.ImageUrl = ds11.Tables[0].Rows[0]["Image"].ToString();
            Session["UserImage"] = ds11.Tables[0].Rows[0]["Image"].ToString();

        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (FileImage.HasFile)
        {
            string p        = FileImage.PostedFile.FileName.ToString();
            string e1       = Path.GetExtension(p);
            string Filename = System.IO.Path.GetFileNameWithoutExtension(p);
            Session["thisDir"] = Server.MapPath(".");
            string path = Session["thisDir"] + "\\Docs\\" + "User";
            {
                if (!System.IO.Directory.Exists(path))
                {
                    Session["PhotoCount"] = 0;
                }
                else
                {
                    Session["PhotoCount"] = Directory.GetFiles(path).Length;
                }
            }
            Session["PhotoCount"] = int.Parse(Session["PhotoCount"].ToString()) + 1;


            string fName          = Filename + Session["PhotoCount"].ToString() + e1;
            string FileUploadNAme = fName;

            if (!System.IO.Directory.Exists(path))
            {
                System.IO.Directory.CreateDirectory(Session["thisDir"] + "\\Docs\\" + "User");
            }
            FileImage.PostedFile.SaveAs(Session["thisDir"] + "\\Docs\\" + "User" + "\\" + fName.ToString());
            Session["ImagePath"] = "Docs\\" + "User" + "\\" + fName.ToString();
            //l_jpg.Text = fName.ToString();
        }



        NameValueCollection objcollection11 = new NameValueCollection();

        objcls = new ClsKrisnAgr(strConnectionString);
        DataSet ds11 = new DataSet();

        objcollection11.Add("@TableId", Session["TableId"].ToString());
        objcollection11.Add("@Name", txtName.Text);
        objcollection11.Add("@Address", txtAddress.Text);
        objcollection11.Add("@PhoneNo", txtPhone.Text);
        objcollection11.Add("@EmailId", txtEmail.Text);
        objcollection11.Add("@Image", Session["ImagePath"].ToString());
        ds11 = objcls.GetdataWithPera("UpdateAdminRegistration", objcollection11);
        Response.Redirect("Admin_Profile.aspx");
    }
    public void getpendingrequestdata()
    {
        NameValueCollection objcollection = new NameValueCollection();

        objcls = new ClsKrisnAgr(strConnectionString);
        DataSet ds = new DataSet();

        ds = objcls.Getdata("Selectpendingrequestdata");
        if (ds.Tables[0].Rows.Count > 0)
        {
            lblCountRequest.Text = ds.Tables[0].Rows.Count.ToString();
        }
        else
        {
            lblCountRequest.Text = "0";
        }
    }
    public void getpendingrequestdata()
    {
        NameValueCollection objcollection = new NameValueCollection();
        objcls = new ClsKrisnAgr(strConnectionString);
        DataSet ds = new DataSet();
        ds = objcls.Getdata("Selectpendingrequestdata");
        if (ds.Tables[0].Rows.Count > 0)
        {

            lblCountRequest.Text = ds.Tables[0].Rows.Count.ToString();

        }
        else
        {
            lblCountRequest.Text = "0";
        }
    }
    public void getAdmitRegistationDetail()
    {
        NameValueCollection objcollection11 = new NameValueCollection();
        objcls = new ClsKrisnAgr(strConnectionString);
        DataSet ds11 = new DataSet();
        objcollection11.Add("@TableId", Session["TableId"].ToString());
        objcollection11.Add("@Type", Session["Type"].ToString());
        ds11 = objcls.GetdataWithPera("selectAdminRegistration", objcollection11);
        if (ds11.Tables[0].Rows.Count > 0)
        {

            lblUserName.Text = ds11.Tables[0].Rows[0]["Name"].ToString();

            imgUserImage.ImageUrl = ds11.Tables[0].Rows[0]["Image"].ToString();

        }
    }
    public void getAdmitRegistationDetail()
    {
        NameValueCollection objcollection11 = new NameValueCollection();

        objcls = new ClsKrisnAgr(strConnectionString);
        DataSet ds11 = new DataSet();

        objcollection11.Add("@TableId", Session["TableId"].ToString());
        objcollection11.Add("@Type", Session["Type"].ToString());
        ds11 = objcls.GetdataWithPera("selectAdminRegistration", objcollection11);
        if (ds11.Tables[0].Rows.Count > 0)
        {
            lblUserName.Text = ds11.Tables[0].Rows[0]["Name"].ToString();


            imgUserImage.ImageUrl = ds11.Tables[0].Rows[0]["Image"].ToString();
        }
    }
 public void getAdmitRegistationDetail()
 {
     NameValueCollection objcollection11 = new NameValueCollection();
     objcls = new ClsKrisnAgr(strConnectionString);
     DataSet ds11 = new DataSet();
     objcollection11.Add("@TableId", Session["TableId"].ToString());
     objcollection11.Add("@Type", Session["Type"].ToString());
     ds11 = objcls.GetdataWithPera("selectAdminRegistration", objcollection11);
     if (ds11.Tables[0].Rows.Count > 0)
     {
         lblName.Text = ds11.Tables[0].Rows[0]["Name"].ToString();
         lblEmail.Text = ds11.Tables[0].Rows[0]["EmailId"].ToString();
         lblAddress.Text=ds11.Tables[0].Rows[0]["Address"].ToString();
         lblPhone.Text=ds11.Tables[0].Rows[0]["PhoneNo"].ToString();
         lblUserName.Text = ds11.Tables[0].Rows[0]["username"].ToString();
         lblPassword.Text = ds11.Tables[0].Rows[0]["Password"].ToString();
         ImgProfile.ImageUrl = ds11.Tables[0].Rows[0]["Image"].ToString();
     }
 }
    public void getAdmitRegistationDetail()
    {
        NameValueCollection objcollection11 = new NameValueCollection();

        objcls = new ClsKrisnAgr(strConnectionString);
        DataSet ds11 = new DataSet();

        objcollection11.Add("@TableId", Session["TableId"].ToString());
        objcollection11.Add("@Type", Session["Type"].ToString());
        ds11 = objcls.GetdataWithPera("selectAdminRegistration", objcollection11);
        if (ds11.Tables[0].Rows.Count > 0)
        {
            txtName.Text    = ds11.Tables[0].Rows[0]["Name"].ToString();
            txtEmail.Text   = ds11.Tables[0].Rows[0]["EmailId"].ToString();
            txtAddress.Text = ds11.Tables[0].Rows[0]["Address"].ToString();
            txtPhone.Text   = ds11.Tables[0].Rows[0]["PhoneNo"].ToString();

            ImgPersion.ImageUrl  = ds11.Tables[0].Rows[0]["Image"].ToString();
            Session["ImagePath"] = ds11.Tables[0].Rows[0]["Image"].ToString();
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (FileImage.HasFile)
        {

            string p = FileImage.PostedFile.FileName.ToString();
            string e1 = Path.GetExtension(p);
            string Filename = System.IO.Path.GetFileNameWithoutExtension(p);
            Session["thisDir"] = Server.MapPath(".");
            string path = Session["thisDir"] + "\\Docs\\" + "User";
            {

                if (!System.IO.Directory.Exists(path))
                {
                    Session["PhotoCount"] = 0;
                }
                else
                {
                    Session["PhotoCount"] = Directory.GetFiles(path).Length;
                }

            }
            Session["PhotoCount"] = int.Parse(Session["PhotoCount"].ToString()) + 1;

            string fName = Filename + Session["PhotoCount"].ToString() + e1;
            string FileUploadNAme = fName;

            if (!System.IO.Directory.Exists(path))
            {
                System.IO.Directory.CreateDirectory(Session["thisDir"] + "\\Docs\\" + "User");
            }
            FileImage.PostedFile.SaveAs(Session["thisDir"] + "\\Docs\\" + "User" + "\\" + fName.ToString());
            Session["ImagePath"] = "Docs\\" + "User" + "\\" + fName.ToString();
            //l_jpg.Text = fName.ToString();

        }

        NameValueCollection objcollection11 = new NameValueCollection();
        objcls = new ClsKrisnAgr(strConnectionString);
        DataSet ds11 = new DataSet();
        objcollection11.Add("@TableId", Session["TableId"].ToString());
        objcollection11.Add("@Name", txtName.Text);
        objcollection11.Add("@Address", txtAddress.Text);
        objcollection11.Add("@PhoneNo", txtPhone.Text);
        objcollection11.Add("@EmailId", txtEmail.Text);
        objcollection11.Add("@Image", Session["ImagePath"].ToString());
        ds11 = objcls.GetdataWithPera("UpdateAdminRegistration", objcollection11);
        Response.Redirect("Admin_Profile.aspx");
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (FileImage.HasFile)
        {
            if (Session["UserImage"] == "Upload_File/DefultImage_123.png")
            {
            }
            else
            {
                // File.Delete(Session["UserImage"].ToString());
            }

            string p        = FileImage.PostedFile.FileName.ToString();
            string e1       = Path.GetExtension(p);
            string Filename = System.IO.Path.GetFileNameWithoutExtension(p);
            Session["thisDir"] = Server.MapPath(".");
            string path = Session["thisDir"] + "\\Docs\\" + "User";
            {
                if (!System.IO.Directory.Exists(path))
                {
                    Session["PhotoCount"] = 0;
                }
                else
                {
                    Session["PhotoCount"] = Directory.GetFiles(path).Length;
                }
            }
            Session["PhotoCount"] = int.Parse(Session["PhotoCount"].ToString()) + 1;


            string fName          = Filename + Session["PhotoCount"].ToString() + e1;
            string FileUploadNAme = fName;

            if (!System.IO.Directory.Exists(path))
            {
                System.IO.Directory.CreateDirectory(Session["thisDir"] + "\\Docs\\" + "User");
            }
            FileImage.PostedFile.SaveAs(Session["thisDir"] + "\\Docs\\" + "User" + "\\" + fName.ToString());
            Session["UserImage"] = "Docs\\" + "User" + "\\" + fName.ToString();
            //l_jpg.Text = fName.ToString();
        }



        NameValueCollection objcollection11 = new NameValueCollection();

        objcls = new ClsKrisnAgr(strConnectionString);
        DataSet ds11 = new DataSet();

        objcollection11.Add("@RId", Request.QueryString["Rid"].ToString());
        objcollection11.Add("@ProfId", txtStudentId.Text);
        objcollection11.Add("@Type", dr_Type.SelectedValue);
        objcollection11.Add("@Name", txtName.Text);
        objcollection11.Add("@GraduatedYear", dr_Graduatyear.SelectedValue);
        objcollection11.Add("@Course", dr_course.SelectedValue);
        objcollection11.Add("@Phone", txtPhone.Text);
        objcollection11.Add("@Email", txtEmailId.Text);
        objcollection11.Add("@Address", txtParmanaantaddress.Text);
        objcollection11.Add("@Workposition", txtPossition.Text);

        objcollection11.Add("@Image", Session["UserImage"].ToString());
        ds11 = objcls.GetdataWithPera("UpdateRegistration", objcollection11);
        Response.Redirect("View_User.aspx");
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (FileImage.HasFile)
        {

            if (Session["UserImage"] == "Upload_File/DefultImage_123.png")
            {

            }
            else
            {
               // File.Delete(Session["UserImage"].ToString());
            }

            string p = FileImage.PostedFile.FileName.ToString();
            string e1 = Path.GetExtension(p);
            string Filename = System.IO.Path.GetFileNameWithoutExtension(p);
            Session["thisDir"] = Server.MapPath(".");
            string path = Session["thisDir"] + "\\Docs\\" + "User";
            {

                if (!System.IO.Directory.Exists(path))
                {
                    Session["PhotoCount"] = 0;
                }
                else
                {
                    Session["PhotoCount"] = Directory.GetFiles(path).Length;
                }

            }
            Session["PhotoCount"] = int.Parse(Session["PhotoCount"].ToString()) + 1;

            string fName = Filename + Session["PhotoCount"].ToString() + e1;
            string FileUploadNAme = fName;

            if (!System.IO.Directory.Exists(path))
            {
                System.IO.Directory.CreateDirectory(Session["thisDir"] + "\\Docs\\" + "User");
            }
            FileImage.PostedFile.SaveAs(Session["thisDir"] + "\\Docs\\" + "User" + "\\" + fName.ToString());
            Session["UserImage"] = "Docs\\" + "User" + "\\" + fName.ToString();
            //l_jpg.Text = fName.ToString();

        }

        NameValueCollection objcollection11 = new NameValueCollection();
        objcls = new ClsKrisnAgr(strConnectionString);
        DataSet ds11 = new DataSet();
        objcollection11.Add("@RId", Request.QueryString["Rid"].ToString());
        objcollection11.Add("@ProfId", txtStudentId.Text);
        objcollection11.Add("@Type", dr_Type.SelectedValue);
        objcollection11.Add("@Name", txtName.Text);
        objcollection11.Add("@GraduatedYear", dr_Graduatyear.SelectedValue);
        objcollection11.Add("@Course",dr_course.SelectedValue);
        objcollection11.Add("@Phone", txtPhone.Text);
        objcollection11.Add("@Email", txtEmailId.Text);
        objcollection11.Add("@Address", txtParmanaantaddress.Text);
        objcollection11.Add("@Workposition", txtPossition.Text);

        objcollection11.Add("@Image", Session["UserImage"].ToString());
        ds11 = objcls.GetdataWithPera("UpdateRegistration", objcollection11);
        Response.Redirect("View_User.aspx");
    }