protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //DDLClubName.Visible = false;
            //txtName.Visible = true;
            //btnSearch.Visible = true;

            DDLClubName.Visible = true;
            //txtName.Visible = false;
            //btnSearch.Visible = false;
            rbtnSearch.SelectedIndex = 2;

            DDLClubName.DataSourceID = "DSDistClubNo";
            DDLClubName.DataBind();


            bool b;
            if (b = true)
            {
                Session["searchField"] = null;
                Session["name"]        = null;
                Session["value"]       = null;
                b = false;
            }

            ManageGrid();
        }
    }
Exemplo n.º 2
0
    private void GetPositionHeld(int id)
    {
        DBconnection obj = new DBconnection();

        obj.SetCommandSP = "z_GetPositionHeld";
        obj.AddParam("@id", id);
        DataTable dt = new DataTable();

        dt = obj.ExecuteTable();
        if (dt.Rows.Count > 0)
        {
            DDLClubName.DataSourceID = "DSDistClubName";
            DDLClubName.DataBind();

            int clubId = int.Parse(dt.Rows[0]["club_id"].ToString());
            BindMembers(clubId);

            DDLClubName.SelectedValue   = dt.Rows[0]["club_id"].ToString();
            DDLMember.SelectedValue     = dt.Rows[0]["member_id"].ToString();
            DDLPHYear.SelectedItem.Text = dt.Rows[0]["years"].ToString();
            DDLPHeld.SelectedValue      = dt.Rows[0]["position_held_on"].ToString();

            GetDistAvenue(DDLPHYear.SelectedItem.Text.Trim());
            DDLAvenue.SelectedItem.Text = dt.Rows[0]["avenue"].ToString();
            //  GetDistDesignation(int.Parse(DDLAvenue.SelectedValue.ToString()));


            DDLPosition.SelectedItem.Text = dt.Rows[0]["position"].ToString();
        }
    }
Exemplo n.º 3
0
    private void GetInstalation(int id)
    {
        DDLClubName.DataSourceID = "DSDistClubNo";
        DDLClubName.DataBind();

        DBconnection obj = new DBconnection();

        obj.SetCommandSP = "z_GetInstalationCal";
        obj.AddParam("@id", id);
        DataTable dt = new DataTable();

        dt = obj.ExecuteTable();
        if (dt.Rows.Count > 0)
        {
            DDLClubName.SelectedItem.Text = dt.Rows[0]["club_name"].ToString();
            DDLClubName.SelectedValue     = dt.Rows[0]["club_id"].ToString();
            RadDatePicker1.DbSelectedDate = DateTime.Parse(dt.Rows[0]["date"].ToString());
            string[] time = dt.Rows[0]["time"].ToString().Split(':');
            DDLTimeH.SelectedValue    = time[0].ToString();
            DDLTimeM.SelectedValue    = time[1].ToString();
            DDLTimeAMPM.SelectedValue = time[2].ToString();

            DDLcg.SelectedItem.Text = dt.Rows[0]["cheif_guest"].ToString();
            DDLcg.SelectedValue     = dt.Rows[0]["cheif_guest"].ToString();
        }
    }
Exemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["user"] != null)
        {
            DDLClubName.DataSourceID = "DSDistClubNo";
            DDLClubName.DataBind();

            if (!IsPostBack)
            {
                txtCheifGuest.Visible     = false;
                DDLcg.SelectedIndex       = 0;
                DDLClubName.SelectedIndex = 0;
                BindTime();

                if (Request.QueryString["id"] != null)
                {
                    int id = int.Parse(Request.QueryString["id"].ToString());
                    GetInstalation(id);
                }
            }
        }
        else
        {
            Session.Abandon();
            Server.Transfer("Default.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["user"] != null)
        {
            if (!IsPostBack)
            {
                DDLClubName.DataSourceID = "DSDistClubNo";
                DDLClubName.DataBind();

                TRTopics.Visible   = false;
                TRClubname.Visible = true;

                if (Request.QueryString["id"] != null)
                {
                    int id = int.Parse(Request.QueryString["id"].ToString());
                    GetSpeaker(id);
                }
            }
        }
        else
        {
            Session.Abandon();
            Response.Redirect("Default.aspx");
        }
    }
Exemplo n.º 6
0
    private void GetBOD(int id)
    {
        DBconnection obj = new DBconnection();

        obj.SetCommandQry = "select * from View_BodMembers where id='" + id + "'";
        DataTable dt = new DataTable();

        dt = obj.ExecuteTable();
        if (dt.Rows.Count > 0)
        {
            int clubid = int.Parse(dt.Rows[0]["DistrictClubID"].ToString());

            DDLClubName.DataSourceID = "DSDistClubNo";
            DDLClubName.DataBind();

            BindMembers(clubid);
            BindDesignations(clubid);
            DDLClubName.SelectedItem.Text = dt.Rows[0]["club_name"].ToString();
            DDLClubName.SelectedValue     = dt.Rows[0]["DistrictClubID"].ToString();


            try
            {
                //int desi_id = int.Parse(dt.Rows[0]["designation_id"].ToString());
                //DDLDesignation.SelectedValue = desi_id.ToString();
                DDLDesignation.SelectedItem.Text = dt.Rows[0]["designation"].ToString();
                DDLDesignation.SelectedValue     = dt.Rows[0]["designation_id"].ToString();
            }
            catch { }

            try
            {
                //int mem_id = int.Parse(dt.Rows[0]["MemberId"].ToString());
                //DDLMember.SelectedValue = mem_id.ToString();
                DDLMember.SelectedItem.Text = dt.Rows[0]["fname"].ToString() + " " + dt.Rows[0]["lname"].ToString();
                DDLMember.SelectedValue     = dt.Rows[0]["MemberId"].ToString();
            }
            catch { }

            DDLYears.SelectedItem.Text = dt.Rows[0]["year"].ToString();
        }
    }
Exemplo n.º 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["user"] != null)
        {
            if (!IsPostBack)
            {
                DDLClubName.DataSourceID = "DSDistClubNo";
                DDLClubName.DataBind();

                BindTime();
                TREvents.Visible      = false;
                TRGuestCharge.Visible = false;
                TRSpeaker.Visible     = true;
                TRTopics.Visible      = true;

                if (Request.QueryString["id"] != null)
                {
                    int eid = int.Parse(Request.QueryString["id"].ToString());
                    GetEvents(eid);
                }
                else
                {
                    //string ve = rbtnvenue.SelectedItem.Text;
                    //if (ve == "Regular")
                    //{
                    //    int cid = int.Parse(Session["DistrictClubID"].ToString());
                    //    GetClubDetails(cid);
                    //}
                    //else
                    //{
                    //    txtvenue.Text = "";
                    //}
                }
            }
        }
        else
        {
            Session.Abandon();
            Response.Redirect("Default.aspx");
        }
    }
Exemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["user"] != null)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["id"] != null)
                {
                    DDLClubName.DataSourceID = "DSDistClubNo";
                    DDLClubName.DataBind();

                    int id = int.Parse(Request.QueryString["id"].ToString());
                    GetBodDesignation(id);
                }
            }
        }
        else
        {
            Session.Abandon();
            Response.Redirect("Default.aspx");
        }
    }
Exemplo n.º 9
0
    //private void BindYears()
    //{
    //    try
    //    {
    //        for (Int32 i = 1992; i <= Convert.ToInt32(DateTime.Now.Year); i++)
    //        {
    //            string dt = i + " - " + (i + 1);
    //            DDLYear.Items.Add(dt.ToString());

    //        }
    //        DDLYear.Items.Insert(0, "Year");


    //    }
    //    catch (Exception E)
    //    {
    //        Response.Write(E.Message.ToString());
    //    }
    //}
    private void GetRollHonour(int id)
    {
        DBconnection obj = new DBconnection();

        obj.SetCommandSP = "z_GetRollHonour";
        obj.AddParam("@id", id);
        DataTable dt = new DataTable();

        dt = obj.ExecuteTable();
        if (dt.Rows.Count > 0)
        {
            DDLClubName.DataSourceID = "DSDistClubNo";
            DDLClubName.DataBind();

            DDLClubName.SelectedItem.Text = dt.Rows[0]["clubname"].ToString();
            DDLClubName.SelectedValue     = dt.Rows[0]["DistrictClubID"].ToString();

            DDLYear.SelectedItem.Text    = dt.Rows[0]["years"].ToString();
            DDLMember.SelectedItem.Text  = dt.Rows[0]["president"].ToString();
            DDLMember0.SelectedItem.Text = dt.Rows[0]["secretary"].ToString();
        }
    }
Exemplo n.º 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["user"] != null)
        {
            DDLClubName.DataSourceID = "DSDistClubNo";
            DDLClubName.DataBind();

            if (!IsPostBack)
            {
                BindTime();
                if (Request.QueryString["id"] != null)
                {
                    int id = int.Parse(Request.QueryString["id"].ToString());
                    GetOCV(id);
                }
            }
        }
        else
        {
            Session.Abandon();
            Server.Transfer("Default.aspx");
        }
    }