Example #1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Entrydetail entryobj = new Entrydetail();
        DataSet ds = new DataSet();
        ds = entryobj.find_rec(ddlpost.SelectedValue, txtRegno.Text.Trim(), txtPassword.Text.Trim());

        if (ds.Tables[0].Rows.Count == 0)
        {
            lblmsg.Text = "Please Check your Registraion Number and Password";
        }
        else
         {
            Session["RegestrationNumber"] = ds.Tables[0].Rows[0]["RegestrationNumber"].ToString();
            Response.Redirect("BankPayment.aspx");
            }

        }
Example #2
0
    protected void btn_Login_Click(object sender, EventArgs e)
    {
        Entrydetail entryobj = new Entrydetail();
        DataSet     ds       = new DataSet();

        ds = entryobj.find_record(txt_REID.Text.Trim(), txt_Password.Text.Trim());

        if (ds.Tables[0].Rows.Count == 0)
        {
            lblmsg.Text = "Please Check your Registraion Number and Password";
        }
        else
        {
            Session["data"] = ds;
            {
                Session["PrintAgain"]         = "Print";
                Session["PostCode"]           = ds.Tables[0].Rows[0]["PostCode"].ToString();
                Session["RegestrationNumber"] = ds.Tables[0].Rows[0]["RegestrationNumber"].ToString();
                Session["CandidateName"]      = ds.Tables[0].Rows[0]["CandidateName"].ToString();
                Session["FatherHusbandName"]  = ds.Tables[0].Rows[0]["FatherHusbandName"].ToString();
                Session["MotherName"]         = ds.Tables[0].Rows[0]["MotherName"].ToString();
                Session["PostName"]           = ds.Tables[0].Rows[0]["Post_name"].ToString();
                Session["Aadharnumber"]       = ds.Tables[0].Rows[0]["Aadharnumber"].ToString();
                Session["DOB"]      = ds.Tables[0].Rows[0]["DOBB"].ToString();
                Session["Password"] = ds.Tables[0].Rows[0]["Password"].ToString();
                Session["addedit"]  = 1;
                if (ds.Tables[0].Rows[0]["Stage"].ToString() == "Stage2" && ds.Tables[0].Rows[0]["Status"].ToString() != "1")
                {
                    Response.Redirect("Register3.aspx");
                }
                else if (ds.Tables[0].Rows[0]["Status"].ToString() == "1" && ds.Tables[0].Rows[0]["IsPayment"].ToString() == "" && ds.Tables[0].Rows[0]["Stage"].ToString() == "Stage2")
                {
                    Response.Redirect("BankPayment.aspx");
                }
                else if (ds.Tables[0].Rows[0]["Status"].ToString() == "1" && ds.Tables[0].Rows[0]["IsPayment"].ToString() == "1")
                {
                    Response.Redirect("RegprintsetAgain.aspx");
                }
                else
                {
                    Response.Redirect("Register2.aspx");
                }
            }
        }
    }
Example #3
0
    protected void LinkButton3_Click(object sender, EventArgs e)
    {
        Entrydetail entryobj = new Entrydetail();
        DataSet     ds       = new DataSet();

        ds = entryobj.find_record(lblrgistration.Text.Trim(), lblpass.Text.Trim());
        Session["data"]               = ds;
        Session["PostCode"]           = lblpostcode.Text;
        Session["RegestrationNumber"] = lblrgistration.Text;
        Session["CandidateName"]      = lblname.Text;
        Session["FatherHusbandName"]  = lblfname.Text;
        Session["MotherName"]         = lblmname.Text;
        Session["PostName"]           = lblpost.Text;
        Session["Aadharnumber"]       = lblaadhar.Text;
        Session["DOB"]     = lbldob.Text;
        Session["addedit"] = 1;
        Response.Redirect("Register3.aspx");
    }
Example #4
0
    private void GetRecord()
    {
        try
        {
            SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["HPSCDBNEW"].ConnectionString);
            cn.Open();
            String     sql = "SELECT b.Post_Name,a.RegestrationNumber,a.CandidateName,a.FatherHusbandName,a.MotherName,a.Gender,a.MaritalStatus,a.Address,a.Block,a.Area,a.City,d.District_Name as State,a.PinCode,a.PermanentAddress,a.Permanentarea,a.PermanentBlock,a.PermanentCity,d.District_Name as PermanentState,a.PermanentPinCode,a.Nationality,a.Perma_contact,a.Corres_contact , CONVERT(VARCHAR(20), a.DOB, 103) as DOBB,a.Email,a.MaritalStatus,c.cat_name as Category  FROM ApplicantDetails a, TblPost b,tblcatgory c,Tbl_District d where a.PostCode=b.Id and a.Category=c.id and a.State=d.District_id and a.RegestrationNumber=@RegestrationNumber and a.status=1 and a.IsPayment =1";
            SqlCommand cmd = new SqlCommand(sql, cn);
            cmd.Parameters.AddWithValue("@RegestrationNumber", Session["RegestrationNumber"].ToString());
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataSet        ds = new DataSet();
            da.Fill(ds);
            if (ds.Tables[0].Rows.Count > 0)
            {
                lbl_Stream.Text   = ds.Tables[0].Rows[0]["Post_Name"].ToString();
                lbl_formno.Text   = ds.Tables[0].Rows[0]["RegestrationNumber"].ToString();
                lbl_name.Text     = ds.Tables[0].Rows[0]["CandidateName"].ToString();
                lbl_fname.Text    = ds.Tables[0].Rows[0]["FatherHusbandName"].ToString();
                lbl_mname.Text    = ds.Tables[0].Rows[0]["MotherName"].ToString();
                lbl_Category.Text = ds.Tables[0].Rows[0]["Category"].ToString();
                lbl_DOB.Text      = ds.Tables[0].Rows[0]["DOBB"].ToString();
                switch (ds.Tables[0].Rows[0]["Gender"].ToString())
                {
                case "M":
                    this.lbl_gender.Text = "Male";
                    break;

                case "F":
                    this.lbl_gender.Text = "Female";
                    break;
                }

                lbl_marital.Text = ds.Tables[0].Rows[0]["MaritalStatus"].ToString();

                lbldistrict.Text = ds.Tables[0].Rows[0]["State"].ToString();



                // other Details End


                // Address Start
                lbl_PA.Text    = ds.Tables[0].Rows[0]["Address"].ToString() + "," + ds.Tables[0].Rows[0]["State"].ToString() + "," + ds.Tables[0].Rows[0]["City"].ToString() + "-" + ds.Tables[0].Rows[0]["PinCode"].ToString() + ",Ph:" + ds.Tables[0].Rows[0]["Perma_contact"].ToString();
                lbl_email.Text = ds.Tables[0].Rows[0]["Email"].ToString();
                lbl_CA.Text    = ds.Tables[0].Rows[0]["PermanentAddress"].ToString() + "," + ds.Tables[0].Rows[0]["PermanentState"].ToString() + "," + ds.Tables[0].Rows[0]["PermanentCity"].ToString() + "-" + ds.Tables[0].Rows[0]["PermanentPinCode"].ToString() + ",Ph:" + ds.Tables[0].Rows[0]["Corres_contact"].ToString();

                DataSet ds1 = new DataSet();
                ds1 = Entrydetail.bind_repeter(Session["RegestrationNumber"].ToString());
                Repeater1.DataSource = ds1;
                Repeater1.DataBind();

                DataSet dsExp = new DataSet();
                dsExp = Entrydetail.bind_repeterEXP(Session["RegestrationNumber"].ToString());
                Repeater2.DataSource = dsExp;
                Repeater2.DataBind();
                // image Bind
                Image1.ImageUrl = "~/ShowImage.ashx?id=" + Session["RegestrationNumber"].ToString();
                Image2.ImageUrl = "~/ShowImage2.ashx?id=" + Session["RegestrationNumber"].ToString();
                Label7.Text     = "Printing Again. Amount has been paid  earlier";
            }
            else
            {
                Label7.Text = "Incomplete Form Please Update your Detail.";
            }
        }
        catch (Exception ex)
        {
            // Log the exception
            Response.Redirect("RegistrationErr.aspx");
        }
        finally
        {
        }
    }
Example #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            bind_Post();

            drpCategory.DataSource     = Entrydetail.fillcategory();
            drpCategory.DataTextField  = "cat_name";
            drpCategory.DataValueField = "id";
            drpCategory.DataBind();
            drpCategory.Items.Insert(0, new ListItem("--Select--", "0"));

            lblpostcode.Text    = Session["PostCode"].ToString();
            lblname.Text        = Session["CandidateName"].ToString();
            lblfname.Text       = Session["FatherHusbandName"].ToString();
            lblmname.Text       = Session["MotherName"].ToString();
            lblrgistration.Text = Session["RegestrationNumber"].ToString();
            lblpost.Text        = Session["PostName"].ToString();
            lblaadhar.Text      = Session["Aadharnumber"].ToString();
            lbldob.Text         = Session["DOB"].ToString();
            lblpass.Text        = Session["Password"].ToString();
            if (Convert.ToInt16(Session["addedit"].ToString()) == 0)
            {
                trcategory.Visible    = true;
                trsubcategory.Visible = true;
                //   trsubcattype.Visible = false;
                // trdateofjoining.Visible = false;
                //  trdateofrelese.Visible = false;
                //  trcertificate.Visible = false;
                //   trcertificateissuedate.Visible = false;
                //  trcertificateissueauthority.Visible = false;
                //   trcertificateissueauthorityEmail.Visible = false;
            }
            else
            {
                DataSet ds = new DataSet();
                ds = (DataSet)Session["data"];

                Session["data"]           = ds;
                drpGender.SelectedValue   = ds.Tables[0].Rows[0]["Gender"].ToString();
                drpmarital.SelectedValue  = ds.Tables[0].Rows[0]["MaritalStatus"].ToString();
                drpCategory.SelectedValue = ds.Tables[0].Rows[0]["Category"].ToString();

                drpnationality.SelectedValue = ds.Tables[0].Rows[0]["Nationality"].ToString();
                drpsubcat.SelectedValue      = ds.Tables[0].Rows[0]["Sub_Category"].ToString();
                drpphyhani.SelectedValue     = ds.Tables[0].Rows[0]["Handicap_Sub_Category"].ToString();
                txtcertiname.Text            = ds.Tables[0].Rows[0]["Certificate_Number"].ToString();
                txtissueauthority.Text       = ds.Tables[0].Rows[0]["Issuing_Authority"].ToString();
                txtissueauthorityemail.Text  = ds.Tables[0].Rows[0]["Issuing_Authority_Email"].ToString();
                if (ds.Tables[0].Rows[0]["Issue_Date"].ToString() == "1900-01-01 00:00:00" || ds.Tables[0].Rows[0]["Issue_Date"].ToString() == null || ds.Tables[0].Rows[0]["Issue_Date"].ToString() == "")
                {
                    txtissuedate.Text = "";
                }
                else
                {
                    DateTime dt = DateTime.Parse(ds.Tables[0].Rows[0]["Issue_Date"].ToString());
                    txtissuedate.Text = dt.ToShortDateString();
                }
                TxtEmail.Text  = ds.Tables[0].Rows[0]["Email"].ToString();
                txtdebard.Text = ds.Tables[0].Rows[0]["debarredGovt"].ToString();
                txtarea.Text   = ds.Tables[0].Rows[0]["Block"].ToString();
                txtblock.Text  = ds.Tables[0].Rows[0]["Area"].ToString();
                txtcarea.Text  = ds.Tables[0].Rows[0]["Permanentarea"].ToString();
                txtcblock.Text = ds.Tables[0].Rows[0]["PermanentBlock"].ToString();


                drpsubcattype.SelectedValue = ds.Tables[0].Rows[0]["Sub_CategoryType"].ToString();


                if (ds.Tables[0].Rows[0]["JoiningDate"].ToString() == "1900-01-01 00:00:00" || ds.Tables[0].Rows[0]["JoiningDate"].ToString() == null || ds.Tables[0].Rows[0]["JoiningDate"].ToString() == "")
                {
                    txtsubcatdatejoin.Text = "";
                }
                else
                {
                    DateTime dt1 = DateTime.Parse(ds.Tables[0].Rows[0]["JoiningDate"].ToString());
                    txtsubcatdatejoin.Text = dt1.ToShortDateString();
                }
                if (ds.Tables[0].Rows[0]["LeavingDate"].ToString() == "1900-01-01 00:00:00" || ds.Tables[0].Rows[0]["LeavingDate"].ToString() == null || ds.Tables[0].Rows[0]["LeavingDate"].ToString() == "")
                {
                    txtsubcatdaterel.Text = "";
                }
                else
                {
                    DateTime dt2 = DateTime.Parse(ds.Tables[0].Rows[0]["LeavingDate"].ToString());
                    txtsubcatdaterel.Text = dt2.ToShortDateString();
                }



                txt_PAddress.Text              = ds.Tables[0].Rows[0]["PermanentAddress"].ToString();
                txt_PTehsil.Text               = ds.Tables[0].Rows[0]["PermanentCity"].ToString();
                drppdistrict.SelectedValue     = ds.Tables[0].Rows[0]["PermanentState"].ToString();
                txt_PPinCode.Text              = ds.Tables[0].Rows[0]["PermanentPinCode"].ToString();
                txt_PTelephone.Text            = ds.Tables[0].Rows[0]["Perma_contact"].ToString();
                txt_PEmail.Text                = ds.Tables[0].Rows[0]["Email"].ToString();
                txt_CAddress.Text              = ds.Tables[0].Rows[0]["Address"].ToString();
                txt_CTehsil.Text               = ds.Tables[0].Rows[0]["City"].ToString();
                Drpcdistrict.SelectedValue     = ds.Tables[0].Rows[0]["State"].ToString();
                txt_CPinCode.Text              = ds.Tables[0].Rows[0]["PinCode"].ToString();
                txt_CTelephone.Text            = ds.Tables[0].Rows[0]["Corres_contact"].ToString();
                txtpostapplied.Text            = ds.Tables[0].Rows[0]["Postapplied"].ToString();
                txtpostyear.Text               = ds.Tables[0].Rows[0]["Year"].ToString();
                txtnationality.Text            = ds.Tables[0].Rows[0]["NationalityName"].ToString();
                drpmaritalStatus.SelectedValue = ds.Tables[0].Rows[0]["Matrialstatustype"].ToString();
                txtshg.Text             = ds.Tables[0].Rows[0]["SHG"].ToString();
                txthsrl.Text            = ds.Tables[0].Rows[0]["HSRLM"].ToString();
                drpcardre.SelectedValue = ds.Tables[0].Rows[0]["Cadre"].ToString();
            }
        }
    }