protected void Button1_Click(object sender, EventArgs e) { Brand b=new Brand(); b.BrandName= txtbrandname.Text; b.Website= txtwebsite.Text; b.FacebookPage=facebook.Text; b.TwitterPage=Twitter.Text; b.YoutubeChannel=Youtube.Text; b.GooglePlus=GooglePlus.Text; b.Blog=Blog.Text; b.Flicker=Flickr.Text; b.FourSquareAccount= FoursquareAccount.Text; b.BrandCategoryID = ddlcategory.SelectedValue; b.BrandDescription = txtdiscption.InnerText; b.AllowsCommentsOnWebsite = "0"; b.USERID = "19"; b.LINKIND = LinkedIn.Text; Arhimedes a = new Arhimedes(); a.PositiveClicks = 0; a.BrandID = 7; a.SocialMediaScore = 9; a.PhilanthropyScore = 1; a.PopularityScore = 1; a.TotalScore = 1; a.PositiveClicks = 1; a.NegativeClicks = 1; a.Active = false; a.Date = System.DateTime.Now; a.ArchimedesID = 1; b.BrandID = "21"; // Brand c = new Brand(); // string w = c.UpdateBrand(b); string szID = b.CreateBransh(b, a); // string sz= a.CreateArchimedes(a,asd); // Response.Write(szID); // Common objCommon = new Common(); // objCommon.SavePhoto(FileUpload1, "Images", szID, 2); }
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); }