Example #1
0
    public void GetGovtSchemeNames()
    {
        objScheme = new clsGovtSchems();
        DataSet dsScheme = objScheme.GetSchemeTitles();

        if (dsScheme.Tables[0].Rows.Count > 0)
        {
            ddlSchemeName.DataTextField  = "SchemeName";
            ddlSchemeName.DataValueField = "SchemeId";
            ddlSchemeName.DataSource     = dsScheme.Tables[0];
            ddlSchemeName.DataBind();
            ddlSchemeName.Items.Insert(0, "Select SchemeName");
        }
    }
    public void InsertGovtSchemeDetails()
    {
        objScheme                = new clsGovtSchems();
        objScheme.SchemeName     = txtSchemeName.Text.Trim();
        objScheme.Objective      = txtObjective.Text;
        objScheme.Eligibility    = txtEligibility.Text;
        objScheme.Beneficaries   = txtBeneficiaries.Text;
        objScheme.Benefits       = txtBenefits.Text;
        objScheme.ContactDetails = txtContactDetails.Text;
        objScheme.GovtOrderNo    = txtOrderNo.Text;
        objScheme.DateOfReg      = Convert.ToDateTime(txtDate.Text.Trim());
        int i = objScheme.InsertGovtSchemeDetails();

        if (i > 0)
        {
            Page.RegisterClientScriptBlock("admin", "<script>alert('Scheme Details Posted')</script>");
        }
        else
        {
            Page.RegisterClientScriptBlock("Admin", "<script>alert('Bad Server Request')</script>");
        }
    }
Example #3
0
    public void GetGovtSchemeDetailsById()
    {
        objScheme          = new clsGovtSchems();
        objScheme.SchemeId = Convert.ToInt32(ddlSchemeName.SelectedItem.Value);
        DataSet dsScheme = objScheme.GetGovtSchemeDetailsById();

        if (dsScheme.Tables[0].Rows.Count > 0)
        {
            lblSchemeName.Text    = dsScheme.Tables[0].Rows[0]["SchemeName"].ToString();
            lblObjective.Text     = dsScheme.Tables[0].Rows[0]["Objective"].ToString();
            lblEligibility.Text   = dsScheme.Tables[0].Rows[0]["Eligibility"].ToString();
            lblBeneficiaries.Text = dsScheme.Tables[0].Rows[0]["Beneficiaries"].ToString();
            lblBenefits.Text      = dsScheme.Tables[0].Rows[0]["Benefits"].ToString();
            lblAddress.Text       = dsScheme.Tables[0].Rows[0]["ContactDetails"].ToString();
            lblGovtOrder.Text     = dsScheme.Tables[0].Rows[0]["GovtOrderNo"].ToString();
            lblDateOfStart.Text   = dsScheme.Tables[0].Rows[0]["DateOfReg"].ToString();
        }
        else
        {
            lblMsg.Text = "NO Data Found";
        }
    }