private void GetRotaractClub(int id)
    {
        RotaractClub rc = new RotaractClub();

        rc.Id = id;

        DataTable dt = new DataTable();

        dt = rc.GetRotaractClub();
        if (dt.Rows.Count > 0)
        {
            txtClubName.Text = dt.Rows[0]["club_name"].ToString();
            txtClubNo.Text   = dt.Rows[0]["club_no"].ToString();
            string [] charterDate = dt.Rows[0]["charter_date"].ToString().Split('/');
            DDLDays.SelectedItem.Text  = charterDate[0].ToString();
            DDLMonth.SelectedItem.Text = charterDate[1].ToString();
            DDLYear.SelectedItem.Text  = charterDate[2].ToString();

            DDLSponser.SelectedItem.Text = dt.Rows[0]["sponserd"].ToString();
            txtNoOfMembers.Text          = dt.Rows[0]["no_of_members"].ToString();

            //President

            txtPFName.Text      = dt.Rows[0]["pf_name"].ToString();
            txtPMName.Text      = dt.Rows[0]["pm_name"].ToString();
            txtPLName.Text      = dt.Rows[0]["pl_name"].ToString();
            txtpemail.Text      = dt.Rows[0]["pemailid1"].ToString();
            txtPemail2.Text     = dt.Rows[0]["pemailid2"].ToString();
            txtmobcc.Text       = dt.Rows[0]["pmobile1CC"].ToString();
            txtPmob1.Text       = dt.Rows[0]["pmobile1"].ToString();
            txtmob2cc.Text      = dt.Rows[0]["pmobile2CC"].ToString();
            txtPMob2.Text       = dt.Rows[0]["pmobile2"].ToString();
            txtPBlackberry.Text = dt.Rows[0]["pblackberry"].ToString();
            txtRPhone.Text      = dt.Rows[0]["pphone"].ToString();

            string[] pdob = dt.Rows[0]["pdob"].ToString().Split('/');
            DDLpbDay.SelectedItem.Text   = pdob[0].ToString();
            DDLpbMonth.SelectedItem.Text = pdob[1].ToString();
            DDLpbYear.SelectedItem.Text  = pdob[2].ToString();

            //Secratary

            txtSFName.Text      = dt.Rows[0]["sf_name"].ToString();
            txtSMName.Text      = dt.Rows[0]["sm_name"].ToString();
            txtSLName.Text      = dt.Rows[0]["sl_name"].ToString();
            txtSEmail1.Text     = dt.Rows[0]["semailid1"].ToString();
            txtSEmail2.Text     = dt.Rows[0]["semailid2"].ToString();
            txtSmob1cc.Text     = dt.Rows[0]["smobile1CC"].ToString();
            txtSMob1.Text       = dt.Rows[0]["smobile1"].ToString();
            txtSmob2cc.Text     = dt.Rows[0]["smobile2CC"].ToString();
            txtSMob2.Text       = dt.Rows[0]["smobile2"].ToString();
            txtSBlackberry.Text = dt.Rows[0]["sblackberry"].ToString();
            txtSPhone.Text      = dt.Rows[0]["sphone"].ToString();

            string[] sdob = dt.Rows[0]["sdob"].ToString().Split('/');
            DDLsbDay.SelectedItem.Text   = sdob[0].ToString();
            DDLsbMonth.SelectedItem.Text = sdob[1].ToString();
            DDLsbYear.SelectedItem.Text  = sdob[2].ToString();
        }
    }
示例#2
0
    private void UpdateInteractClub(int id)
    {
        RotaractClub rc = new RotaractClub();

        rc.Id            = id;
        rc.Club_name     = txtClubName.Text.Trim().ToString();
        rc.Club_no       = int.Parse(txtClubNo.Text.Trim().ToString());
        rc.Charter_date  = DDLDays.SelectedItem.Text.Trim().ToString() + "/" + DDLMonth.SelectedItem.Text.Trim().ToString() + "/" + DDLYear.SelectedItem.Text.Trim().ToString();
        rc.Sponserd      = DDLSponser.SelectedItem.Text.Trim().ToString();
        rc.No_of_members = int.Parse(txtNoOfMembers.Text.Trim().ToString());

        rc.Pf_name     = txtPFName.Text.Trim().ToString();
        rc.Pm_name     = txtPMName.Text.Trim().ToString();
        rc.Pl_name     = txtPLName.Text.Trim().ToString();
        rc.Pemail1     = txtpemail.Text.Trim().ToString();
        rc.Pemail2     = txtPemail2.Text.Trim().ToString();
        rc.Pmobile1    = txtPmob1.Text.Trim().ToString();
        rc.Pmobile2    = txtPMob2.Text.Trim().ToString();
        rc.Pblackberry = txtPBlackberry.Text.Trim().ToString();
        rc.Pphone_resi = txtRPhone.Text.Trim().ToString();
        rc.Pdob        = DDLpbDay.SelectedItem.Text.Trim().ToString() + "/" + DDLpbMonth.SelectedItem.Text.Trim().ToString() + "/" + DDLpbYear.SelectedItem.Text.Trim().ToString();


        rc.Sf_name     = txtSFName.Text.Trim().ToString();
        rc.Sm_name     = txtSMName.Text.Trim().ToString();
        rc.Sl_name     = txtSLName.Text.Trim().ToString();
        rc.Semail1     = txtSEmail1.Text.Trim().ToString();
        rc.Semail2     = txtSEmail2.Text.Trim().ToString();
        rc.Smobile1    = txtSMob1.Text.Trim().ToString();
        rc.Smobile2    = txtSMob2.Text.Trim().ToString();
        rc.Sblackberry = txtSBlackberry.Text.Trim().ToString();
        rc.Sphone_resi = txtSPhone.Text.Trim().ToString();
        rc.Sdob        = DDLsbDay.SelectedItem.Text.Trim().ToString() + "/" + DDLsbMonth.SelectedItem.Text.Trim().ToString() + "/" + DDLsbYear.SelectedItem.Text.Trim().ToString();



        int exe = rc.UpdateInteractClub();

        if (exe > 0)
        {
            //clear();

            // Page.ClientScript.RegisterStartupScript(this.GetType(), "redirect", "location.href = 'view_rotaract_club.aspx'", true);
            //string jv = "<script>alert('Record Updated Successfully');</script>";
            //ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "alert", jv, false);
            showmsg("Record updated successfully !", "view_interact_club.aspx");
        }
    }
示例#3
0
    private void AddInteractClub()
    {
        RotaractClub rc = new RotaractClub();

        rc.Club_name     = txtClubName.Text.Trim().ToString();
        rc.Club_no       = int.Parse(txtClubNo.Text.Trim().ToString());
        rc.Charter_date  = DDLDays.SelectedItem.Text.Trim().ToString() + "/" + DDLMonth.SelectedItem.Text.Trim().ToString() + "/" + DDLYear.SelectedItem.Text.Trim().ToString();
        rc.Sponserd      = DDLSponser.SelectedItem.Text.Trim().ToString();
        rc.No_of_members = int.Parse(txtNoOfMembers.Text.Trim().ToString());

        rc.Pf_name     = txtPFName.Text.Trim().ToString();
        rc.Pm_name     = txtPMName.Text.Trim().ToString();
        rc.Pl_name     = txtPLName.Text.Trim().ToString();
        rc.Pemail1     = txtpemail.Text.Trim().ToString();
        rc.Pemail2     = txtPemail2.Text.Trim().ToString();
        rc.Pmobile1    = txtPmob1.Text.Trim().ToString();
        rc.Pmobile2    = txtPMob2.Text.Trim().ToString();
        rc.Pblackberry = txtPBlackberry.Text.Trim().ToString();
        rc.Pphone_resi = txtRPhone.Text.Trim().ToString();
        rc.Pdob        = DDLpbDay.SelectedItem.Text.Trim().ToString() + "/" + DDLpbMonth.SelectedItem.Text.Trim().ToString() + "/" + DDLpbYear.SelectedItem.Text.Trim().ToString();


        rc.Sf_name     = txtSFName.Text.Trim().ToString();
        rc.Sm_name     = txtSMName.Text.Trim().ToString();
        rc.Sl_name     = txtSLName.Text.Trim().ToString();
        rc.Semail1     = txtSEmail1.Text.Trim().ToString();
        rc.Semail2     = txtSEmail2.Text.Trim().ToString();
        rc.Smobile1    = txtSMob1.Text.Trim().ToString();
        rc.Smobile2    = txtSMob2.Text.Trim().ToString();
        rc.Sblackberry = txtSBlackberry.Text.Trim().ToString();
        rc.Sphone_resi = txtSPhone.Text.Trim().ToString();
        rc.Sdob        = DDLsbDay.SelectedItem.Text.Trim().ToString() + "/" + DDLsbMonth.SelectedItem.Text.Trim().ToString() + "/" + DDLsbYear.SelectedItem.Text.Trim().ToString();



        int exe = rc.AddInteractClub();

        if (exe > 0)
        {
            //clear();
            string jv = "<script>alert('Record Added Successfully');</script>";
            ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "alert", jv, false);
        }
    }