private void load_dropdown()
    {
        string sql = "Select * from main_group_mst ";

        ds = cn.Getresult(sql, "main_group_mst");

        DropDownList1.DataSource     = ds;
        DropDownList1.DataTextField  = "main_group_name";
        DropDownList1.DataValueField = "main_group_id";
        DropDownList1.DataBind();
    }
Ejemplo n.º 2
0
    public void fillschoolsection()
    {
        string schoolsection = "SELECT school_dept_id,school_dept_name FROM school_dept_mst where school_id =" + ddlschoolid.SelectedItem.Value;

        ds = con.Getresult(schoolsection, "school_dept_master");
        ddlsclsections.DataSource     = ds;
        ddlsclsections.DataTextField  = "school_dept_name";
        ddlsclsections.DataValueField = "school_dept_id";
        ddlsclsections.DataBind();
        // ddlAccountHead.Items.Insert(0, new ListItem("-- प्रमुख खाते निवडा --", "0"));
    }
    private void LoadGrid()
    {
        string sql = "Select account_head_id,account_head_name   from account_head";

        ds = cn.Getresult(sql, "account_head");
        if (ds.Tables.Count > 0)
        {
            GridView1.DataSource = ds;
            GridView1.DataBind();
        }
        else
        {
            Response.Write("Unable to connect to the database.");
        }
    }
Ejemplo n.º 4
0
 public void fillAccountHead() // this function fill the records into accountHead grid
 {
     if (!this.IsPostBack)
     {
         string selectAccountHead = "SELECT account_head_id,account_head_name FROM account_head";
         ds = con.Getresult(selectAccountHead, "account_head");
         ddlAccountHead.DataSource     = ds;
         ddlAccountHead.DataTextField  = "account_head_name";
         ddlAccountHead.DataValueField = "account_head_id";
         ddlAccountHead.DataBind();
         ddlAccountHead.Items.Insert(0, new ListItem("-- प्रमुख खाते निवडा --", "0"));
     }
     if (1 == 1)
     {
     }
 }
Ejemplo n.º 5
0
    protected void btnexit_Click(object sender, EventArgs e)
    {
        clsconnection con = new clsconnection();

        clsconnection.create_login_id = Request.Form["txtuid"];
        string sql = "Select user_pwd,user_name from user_master where login_id ='" + Request.Form["txtuid"] + "'";

        ds = con.Getresult(sql, "user_master");
        DataTable dt     = ds.Tables["user_master"];
        double    dPrice = 0;

        if (ds.Tables.Count > 0)
        {
            if (dt.Rows.Count > 0)
            {
                if (dt.Rows[0][0].ToString() == Request.Form["txtpwd"])
                {
                    string login_id = Request.Form["txtuid"].ToString();
                    Session["login_name"]     = dt.Rows[0][1].ToString();
                    Session["login_id"]       = Request.Form["txtuid"];
                    Session["schoolname"]     = ddlschoolid.SelectedItem.Text;
                    Session["schoolid"]       = ddlschoolid.SelectedItem.Value;
                    Session["schooldeptname"] = ddlsclsections.SelectedItem.Text;
                    Session["schholdeptid"]   = ddlsclsections.SelectedItem.Value;
                    Session["accounthead_id"] = "५";
                    Response.Redirect("GRModulepage.aspx?login_id=" + login_id);
                }
                else
                {
                    Response.Write("<script LANGUAGE='JavaScript' >alert('Password is Incorrrect')</script>");
                }
            }
            else
            {
                Response.Write("<script LANGUAGE='JavaScript' >alert('User not found')</script>");
            }
        }
    }