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); }
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); }
protected void loadpage() { Security.UserInfo usr = new Security.UserInfo(); string username = Session["USERNAME"].ToString(); Security.UserInfo usrs = usr.getUserProfileFromEmail(username); lblname.Text = usrs.Fname; lbllastname.Text = usrs.Lname; lblemail.Text = usrs.Username; lblfacebook.Text = usrs.FBHandler; lbltwitter.Text = usrs.TwiterHandler; }
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); }
protected void addcomment(object sender, ImageClickEventArgs e) { Security.UserInfo usr = new Security.UserInfo(); string username = Session["USERNAME"].ToString(); Security.UserInfo usrs = usr.getUserProfileFromEmail(username); Comments com = new Comments(); string brandid = Request.QueryString["id"]; com.BrandID =""+ brandid+""; com.Comment = txtdiscption.InnerText; com.UserID = usrs.UserID; com.Deleted = false; com.Date = System.DateTime.Now; com.PostAsAnonymous = false; com.BrandCommentID = 0; com.CreateComment(com); }
protected void loadpage() { Security.UserInfo usr = new Security.UserInfo(); string username = Session["USERNAME"].ToString(); Security.UserInfo usrs = usr.getUserProfileFromEmail(username); lblname.Text = usrs.Fname + " " + usrs.Lname; txtfacebook.Text = usrs.FBHandler; txttwitter.Text = usrs.TwiterHandler; Image1.ImageUrl = "~/images/" + usrs.PhotoUrl; Brand.PostBackUrl = "~/Brand/AddBrand.aspx"; NGO.PostBackUrl = "~/NGO/AddNGO.aspx"; changepass.PostBackUrl = "~/User/Forgetpass.aspx"; }
protected void positive(object sender, ImageClickEventArgs e) { Security.UserInfo usr = new Security.UserInfo(); string username = Session["USERNAME"].ToString(); Security.UserInfo usrs = usr.getUserProfileFromEmail(username); Brand.UserBrandlike objuserlike = new Brand.UserBrandlike(); objuserlike.UserID = usrs.UserID; objuserlike.BrandID = Request.QueryString["id"]; objuserlike = objuserlike.getdetails(usrs.UserID, objuserlike.BrandID); if (objuserlike.UserID != "") { string a = objuserlike.update(objuserlike, "1", "0"); } else { objuserlike.PositiveClick = "1"; objuserlike.NegativeClick = "0"; objuserlike.BrandID = Request.QueryString["id"]; objuserlike.UserID = usrs.UserID; string a = objuserlike.createUserBrandlike(objuserlike); } }
protected void Page_Load(object sender, EventArgs e) { string username = Session["USERNAME"].ToString(); Security.UserInfo usrs = new Security.UserInfo(); usrs = usrs.getUserProfileFromEmail(username); // usrs = usrs.getUserProfile("22"); try { if (usrs.Active == "0") { // Response.Redirect("~/User/login.aspx"); } if (!Page.IsPostBack) { // db.Brandcategories(ddlcategory); } } catch { // Response.Redirect("~/User/login.aspx"); } }
protected void Button1_Click1(object sender, EventArgs e) { string username = Session["USERNAME"].ToString(); int counterSocailMedia = 0; Security.UserInfo usrs = new Security.UserInfo(); usrs = usrs.getUserProfileFromEmail(username); Brand objbrand = new Brand(); objbrand.BrandName = txtbrandname.Text; objbrand.BrandCategoryID = ddlcategory.SelectedValue; objbrand.BrandDescription = txtdiscption.InnerText; objbrand.USERID = usrs.UserID; //socail media directly counted if (txtwebsite.Text.Length > 0) { objbrand.Website = txtwebsite.Text; counterSocailMedia = counterSocailMedia + 5; } if (ddlyes.SelectedValue.Length > 0) { objbrand.AllowsCommentsOnWebsite = ddlyes.SelectedValue; counterSocailMedia = counterSocailMedia + 3; } if (Blog.Text.Length > 0) { objbrand.Blog = Blog.Text; counterSocailMedia = counterSocailMedia + 2; } //socail media objbrand.FacebookPage = facebook.Text; objbrand.TwitterPage = Twitter.Text; if (Youtube.Text.Length > 0) { objbrand.YoutubeChannel = Youtube.Text; counterSocailMedia = counterSocailMedia + 2; } if (GooglePlus.Text.Length > 0) { objbrand.GooglePlus = GooglePlus.Text; counterSocailMedia = counterSocailMedia + 2; } objbrand.Blog = Blog.Text; objbrand.Flicker = Flickr.Text; if (FoursquareAccount.Text.Length > 0) { objbrand.FourSquareAccount = FoursquareAccount.Text; counterSocailMedia = counterSocailMedia + 2; } if (LinkedIn.Text.Length > 0) { objbrand.LINKIND = LinkedIn.Text; counterSocailMedia = counterSocailMedia + 2; } Arhimedes objarchimedes = new Arhimedes(); objarchimedes.PositiveClicks = 0; objarchimedes.SocialMediaScore = counterSocailMedia; objarchimedes.PhilanthropyScore = 0; objarchimedes.PopularityScore = 0; objarchimedes.TotalScore = 0; objarchimedes.PositiveClicks = 0; objarchimedes.NegativeClicks = 0; objarchimedes.Active = false; objarchimedes.Date = System.DateTime.Now; string szID = objbrand.CreateBransh(objbrand, objarchimedes); }