Beispiel #1
0
    protected void btndonation(object sender, ImageClickEventArgs e)
    {
        Security.UserInfo usr = new Security.UserInfo();
        string username = Session["USERNAME"].ToString();
        Security.UserInfo usrs = usr.getUserProfileFromEmail(username);

        NGOs.DonateNGO objNGO = new NGOs.DonateNGO();
        objNGO.UserID = usrs.UserID;
        objNGO.NGOID = Request.QueryString["id"];
        objNGO.RepresentingBrand = "1";
        objNGO.Amount = "100";
        objNGO.DateOfDonation = DateTime.Now.ToString();
        string hi = objNGO.createNGODonation(objNGO);
    }
Beispiel #2
0
    public void listingtblbody(Table tblbrand, TableRow tblrow, TableCell tblcell)
    {
        NGOs.DonateNGO objbrand = new NGOs.DonateNGO();
        string page = Request.QueryString["Page"];
        if (page == null) page = "1";
        int HOWMANYPAGES = 0;
        List<NGOs.DonateNGO> objbrandlisting = objbrand.getNGODonationAll("", 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 Brandid = objbrandlisting[i].NGOID;
            tblcell.Text = Brandid;
            tblrow.Cells.Add(tblcell);

            tblcell = new TableCell();
            tblcell.Text = objbrandlisting[i].UserID;
            tblrow.Cells.Add(tblcell);

            tblcell = new TableCell();
            tblcell.Text = objbrandlisting[i].RepresentingBrand;
            tblrow.Cells.Add(tblcell);

            tblcell = new TableCell();
            tblcell.Text = objbrandlisting[i].Amount;
            tblrow.Cells.Add(tblcell);

            tblcell = new TableCell();
            tblcell.Text = objbrandlisting[i].DateOfDonation;
            tblrow.Cells.Add(tblcell);
            tblbrand.Controls.Add(tblrow);
        }

        phbrand.Controls.Add(tblbrand);
        string firstPageUrl = "http://localhost/f**k/Admintools/Donations/donationlisting.aspx?";
        //SHARIF Page={0} shoule be like this
        string pagerFormat = "http://localhost/f**k/Admintools/Donations/donationlisting.aspx?Page={0}";
        bottomPager.Show(int.Parse(page), HOWMANYPAGES, firstPageUrl, pagerFormat, true);
    }