Example #1
0
    protected void Button1_Click1(object sender, EventArgs e)
    {
        string username = Session["USERNAME"].ToString();

        Security.UserInfo usrs = new Security.UserInfo();
        usrs = usrs.getUserProfileFromEmail(username);

        NGOs objngo = new NGOs();
        objngo.NGOName = txtbrandname.Text;
        objngo.NGODescription = txtdiscption.InnerText;
        objngo.Website = txtwebsite.Text;
        objngo.FacebookPage = facebook.Text;
        objngo.TwitterPage = Twitter.Text;
          //  objngo.YoutubeChannel = Youtube.Text;
           // objngo.GooglePlus = GooglePlus.Text;
          //  objngo.Blog = Blog.Text;
          //  objngo.Flicker = Flickr.Text;
        objngo.Website = txtwebsite.Text;
        objngo.LINKIND = facebook.Text;
          //  objngo.FourSquareAccount = FoursquareAccount.Text;
        //objngo.BrandCategoryID = ddlcategory.SelectedValue;
        //objngo.BrandDescription = txtdiscption.InnerText;
        objngo.AllowsCommentsOnWebsite = "0";
        objngo.USERID = usrs.UserID;

        string str = objngo.CreateBransh(objngo);
    }
Example #2
0
 private void BindNGO()
 {
     comboBoxEditNGO.Properties.Items.Clear();
     comboBoxEditNGO.Properties.Items.Add(AllString);
     comboBoxEditNGO.Properties.Items.AddRange(NGOs.ToList());
     comboBoxEditNGO.SelectedIndex = 0;
 }
Example #3
0
    protected void btnsubmit(object sender, ImageClickEventArgs e)
    {
        string username = Session["USERNAME"].ToString();
        Security.UserInfo usrs = new Security.UserInfo();
        usrs = usrs.getUserProfileFromEmail(username);

        NGOs objngo = new NGOs();
        objngo.NGOName = txtbrandname.Text;
        objngo.NGODescription = txtdiscption.InnerText;
        objngo.Website = txtwebsite.Text;
        objngo.FacebookPage = facebook.Text;
        objngo.TwitterPage = Twitter.Text;
        objngo.YoutubeChannel = youtube.Text;
        objngo.GooglePlus = googleplus.Text;
        objngo.Blog = blog.Text;
        objngo.Flicker = flickr.Text;
        objngo.Website = txtwebsite.Text;
        objngo.LINKIND = facebook.Text;
        objngo.FourSquareAccount = foursquareaccount.Text;
        objngo.NGOCategoryID = ddlcategory.SelectedValue;
        objngo.NGODescription = txtdiscption.InnerText;
        objngo.USERID = usrs.UserID;

        string str = objngo.CreateBransh(objngo);

        //bank account
        NGOBank ngobank = new NGOBank();
        ngobank.NGOID = "1";
        ngobank.Bank = bankname.Text;
        ngobank.IBAN = iBan.Text;
        ngobank.SWIFTCode = swiftcode.Text;
        ngobank.Branch = branchname.Text;
        ngobank.AccountNB = "123";
        string strs = ngobank.CreateNGOBank(ngobank);
    }
Example #4
0
    public void listingtblbody()
    {
        NGOs objNGO = new NGOs();
        string page = Request.QueryString["Page"];
        if (page == null) page = "1";
        int HOWMANYPAGES = 0;
        List<NGOs> objNGOlisting = objNGO.getNGOAll(true, page.ToString(), "20", out  HOWMANYPAGES);

        Table tblbrand = new Table();
        tblbrand.Width = Unit.Percentage(100);
        tblbrand.CellPadding = 0;
        tblbrand.CellSpacing = 0;
        TableRow tblrow = new TableRow();
        TableCell tblcell = new TableCell();

        int sum = 0;

        for (int i = 0; i < objNGOlisting.Count; i++)
        {

            tblcell.CssClass = "bodycells";
            tblrow.HorizontalAlign = HorizontalAlign.Center;
            tblrow.Style.Add("background-color", "white");
            tblcell = new TableCell();

            string ngoid = objNGOlisting[i].NGOID;
            string logo = objNGOlisting[i].Logo;

            Image imag = new Image();
            imag.Width = 180;
            imag.Height = 180;
            imag.ImageUrl = "~/NGOs/images/" + objNGOlisting[i].Logo;
            imag.Attributes.Add("onclick", "javascript:window.open('ngosdetail.aspx?id=" + ngoid + "');");
            tblcell.Controls.Add(imag);
            tblrow.Cells.Add(tblcell);

            sum = sum + 1;
            if (sum ==5)
            {

                tblbrand.Controls.Add(tblrow);
                tblrow = new TableRow();
                sum = 0;
            }
            else
            {
                tblbrand.Controls.Add(tblrow);
            }

        }

        phbrand.Controls.Add(tblbrand);

        string firstPageUrl = "http://localhost/f**k/NGOs/NGOlisting.aspx";

        //SHARIF Page={0} shoule be like this
        string pagerFormat = "http://localhost/f**k/NGOs/NGOlisting.aspx?Page={0}";

        bottomPager.Show(int.Parse(page), HOWMANYPAGES, firstPageUrl, pagerFormat, true);
    }
Example #5
0
    public void list()
    {
        string ngoid = Request.QueryString["NGOID"];
        NGOs objngo = new NGOs();
        objngo=objngo.getNGODetails(ngoid);
        txtbrandname.Text=objngo.NGOName;
        txtdiscption.InnerText = objngo.NGODescription;
        txtwebsite.Text = objngo.Website;

        facebook.Text = objngo.FacebookPage;
        Twitter.Text = objngo.TwitterPage;
        Youtube.Text= objngo.YoutubeChannel;
        GooglePlus.Text = objngo.GooglePlus;
        Blog.Text = objngo.Blog;
        Flickr.Text = objngo.Flicker;
        Image1.ImageUrl = "~/images/" + objngo.Logo;
    }
Example #6
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string ngoid = Request.QueryString["id"];
        NGOs objngo = new NGOs();
        objngo = objngo.getNGODetails(ngoid);
        objngo.NGOName = txtbrandname.Text;
        objngo.NGODescription = txtdiscption.InnerText;
        objngo.Website = txtwebsite.Text;
        objngo.FacebookPage = facebook.Text;
        objngo.TwitterPage = Twitter.Text;
        objngo.YoutubeChannel = Youtube.Text;
        objngo.GooglePlus = GooglePlus.Text;
        objngo.Blog = Blog.Text;
        objngo.Flicker = Flickr.Text;
        objngo.Website = txtwebsite.Text;
        objngo.FourSquareAccount = FoursquareAccount.Text;
        //objngo.BrandCategoryID = ddlcategory.SelectedValue;
        objngo.NGODescription = txtdiscption.InnerText;
        objngo.AllowsCommentsOnWebsite = "0";

        string str = objngo.UpdateNGO(objngo);
    }
Example #7
0
    public void listingtblbody(Table tblbrand, TableRow tblrow, TableCell tblcell)
    {
        NGOs objbrand = new NGOs();
        string page = Request.QueryString["Page"];
        if (page == null) page = "1";
        int HOWMANYPAGES = 0;
        List<NGOs> objbrandlisting = objbrand.getNGOAll(true, page.ToString(), "5", out  HOWMANYPAGES);

        for (int i = 0; i < objbrandlisting.Count; i++)
        {
            tblrow = new TableRow();
            tblcell.CssClass = "bodycells";
            tblrow.HorizontalAlign = HorizontalAlign.Center;

            tblrow.Style.Add("font-size", "14px");
            tblrow.Style.Add("background-color", "white");
            tblcell = new TableCell();
            string NGOID = objbrandlisting[i].NGOID;
            string logo = objbrandlisting[i].Logo;
            ImageButton imag = new ImageButton();
            imag.Width = 40;
            imag.Height = 40;
            imag.ImageUrl = "~/images/" + objbrandlisting[i].Logo;
            imag.PostBackUrl = "EditNGO.aspx?NGOID=" + NGOID + "";
            tblcell.Controls.Add(imag);
            tblrow.Cells.Add(tblcell);

            tblcell = new TableCell();
            LinkButton lnk = new LinkButton();
            lnk.Style.Add("color", "#2C4B5A");
            lnk.PostBackUrl = "EditNGO.aspx?NGOID=" + NGOID + "";
            lnk.Text = "<PRE> " + objbrandlisting[i].NGOName;
            lnk.Style.Add("text-decoration", "none");
            tblcell.Controls.Add(lnk);
            tblrow.Cells.Add(tblcell);

            string link = "http://";
            tblcell = new TableCell();
            LinkButton website = new LinkButton();
            website.Text = objbrandlisting[i].Website;
             link=link+website.Text;
             website.Attributes.Add("onclick", "javascript:window.open(" + link + ");");
             website.Style.Add("color", "green");
             website.PostBackUrl = "" + link + "";
            tblcell.Controls.Add(website);
            tblrow.Cells.Add(tblcell);

            tblcell = new TableCell();
            ImageButton btnedit = new ImageButton();
            btnedit.PostBackUrl = "EditNGO.aspx?NGOID=" + NGOID + "";
            btnedit.ImageUrl = "logos/edit.png";
            tblcell.Controls.Add(btnedit);
            tblrow.Cells.Add(tblcell);

            tblcell = new TableCell();
            ImageButton btnapprove = new ImageButton();
            string str = "";
            if (int.Parse(page) > 1)
            {
                int number = int.Parse(page);
                str = "ngolist.aspx?page=" + number + "&dl=1&id=" + objbrandlisting[i].NGOID + "";
            }
            else
            {
                str = "ngolist.aspx?dl=1&id=" + objbrandlisting[i].NGOID + "";
            }
            btnapprove.PostBackUrl = str;
            btnapprove.ImageUrl = "logos/approve.png";
            tblcell.Controls.Add(btnapprove);
            tblrow.Cells.Add(tblcell);

            tblcell = new TableCell();
            ImageButton reject = new ImageButton();
            if (int.Parse(page) > 1)
            {
                int number = int.Parse(page);
                str = "ngolist.aspx?page=" + number + "&dl=2&id=" + objbrandlisting[i].NGOID + "";
            }
            else
            {
                str = "ngolist.aspx?dl=2&id=" + objbrandlisting[i].NGOID + "";
            }
            reject.PostBackUrl = str;
            reject.ImageUrl = "logos/reject.png";
            tblcell.Controls.Add(reject);
            tblrow.Cells.Add(tblcell);

            tblbrand.Controls.Add(tblrow);
        }

        phbrand.Controls.Add(tblbrand);

        string firstPageUrl = "http://localhost/f**k/Admintools/NGOs/ngolist.aspx?";

        string pagerFormat = "http://localhost/f**k/Admintools/NGOs/ngolist.aspx?Page={0}";

        bottomPager.Show(int.Parse(page), HOWMANYPAGES, firstPageUrl, pagerFormat, true);
    }
Example #8
0
 public void status()
 {
     NGOs objbrand = new NGOs();
     string type = Request.QueryString["dl"];
     string ngoid = Request.QueryString["id"];
     objbrand.UpdateNGO(int.Parse(ngoid), int.Parse(type));
 }