protected void sign_in_btn_ServerClick(object sender, EventArgs e) { try { user_infoBO user_creadentails = new user_infoBO(); UserFunctionsBAL usersignin = new UserFunctionsBAL(); user_creadentails.email_id = txtEmail.Value.ToString(); user_creadentails.password = txtPassword.Value.ToString(); if (usersignin.UserSigIn(user_creadentails)) { Session["user_id"] = Convert.ToInt32(usersignin.UserIdFetch(user_creadentails.email_id)); Response.Redirect("~/UserProfileHome.aspx"); } else { lblErrorMessage.Text = "Username Or Password Incorrect...!"; } } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("SignIn.aspx", ex.ToString()); Response.Write("<script type='text/javascript'> $(function(){alert('Some Error Occured \n Please try again later')}); </script>"); } }
protected void send_feedBack(object sender, EventArgs e) { Next_ID nid = new Next_ID(); suggestionBAL sBal = new suggestionBAL(); suggestionBO sBO = new suggestionBO(); try { sBO.user_name = sugName.Value.Trim() + suglName.Value.Trim(); sBO.suggestion_id = nid.incrementer("suggestion_id", "suggestion"); sBO.suggestion_msg = comments.Value; sBO.date_time = Convert.ToDateTime(DateTime.Now.ToString()); sBO.userEmail = txtemail.Value; sBO.subject = ""; if (sBal.suggestion_DAL_insert(sBO) > 0) { Response.Write("<script>alert('Thansk for your valuable feedback ');</script>"); sugName.Value = ""; comments.Value = ""; txtemail.Value = ""; } } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("ContachUs.aspx", ex.ToString()); Response.Write("<script>alert('An error occured \n Sorry for inconvenience ');</script>"); } }
//SENDING MAIL to admin protected void suggestion_btn_click(object sender, EventArgs e) { Next_ID nid = new Next_ID(); suggestionBO s_bo = new suggestionBO(); suggestionBAL s_bal = new suggestionBAL(); try { s_bo.suggestion_id = nid.incrementer("suggestion_id", "suggestion"); s_bo.user_name = getusername.UserNameFetch(Convert.ToInt32(Session["user_id"])); s_bo.userEmail = getusername.UserEmailFetch(Convert.ToInt32(Session["user_id"])); s_bo.subject = DDLEmailSubject.SelectedValue.ToString(); s_bo.suggestion_msg = writeEmail.Value; writeEmail.Value = ""; //Server.HtmlEncode(hid_Email_body.Value.ToString()); s_bo.date_time = Convert.ToDateTime(DateTime.Now.ToString()); if (s_bal.suggestion_DAL_insert(s_bo) > 0) { Response.Write("<script type='text/javascript'> window.onload=function(){document.getElementById('parent').style.display='block';}; </script>"); //Response.Redirect("~/UserProfile.aspx"); } } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("UserProfileSuggestion.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
protected void subscribeToIvent_Command(object sender, CommandEventArgs e) { event_subscriberBAL event_bal = new event_subscriberBAL(); event_subscriberBO event_bo = new event_subscriberBO(); event_bo.user_id = Convert.ToInt32(Session["user_id"]); event_bo.event_id = Convert.ToInt32(e.CommandArgument.ToString()); try { //if (Session["user_id"] == null) //{ // Page.ClientScript.RegisterStartupScript(Page.GetType(), "Script", "alert('Please Login First');", true); //} //else if (event_bal.eventSubscriber_getEvent_id_DAL(event_bo)) //{ // Page.ClientScript.RegisterStartupScript(Page.GetType(), "Script", "alert('You Already Subscribe To This Event');", true); //} if (event_bal.evetnsubscriberDAL(event_bo) > 0) { Page.ClientScript.RegisterStartupScript(Page.GetType(), "Script", "alert('You are subscribed to this event');window.open('Event.aspx','_self');", true); } //Response.Redirect("~/Event.aspx"); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("Event.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
protected void btnSave_Command(object sender, CommandEventArgs e) { try { Panel mainImagePanel = (Panel)div_images.FindControl("div_pnl" + e.CommandArgument.ToString()); Panel editPanel = (Panel)mainImagePanel.FindControl("div_editImage" + e.CommandArgument.ToString()); TextBox txtImgInfo = (TextBox)editPanel.FindControl("txt_imgInfo" + e.CommandArgument.ToString()); FileUpload newImage = (FileUpload)editPanel.FindControl("ImageUpload" + e.CommandArgument.ToString()); sliderinfo.img_info = txtImgInfo.Text.Trim(); sliderinfo.img_id = Convert.ToInt32(e.CommandArgument); sliderfunctions.EditImageAndInfo(sliderinfo); if (newImage.HasFile && (newImage.PostedFile.ContentType == "image/jpeg" || newImage.PostedFile.ContentType == "image/png" || newImage.PostedFile.ContentType == "image/gif")) { String path = Server.MapPath("~/Images/sliderImages/"); String filename = e.CommandArgument.ToString() + ".jpg"; if (newImage.PostedFile.ContentType == "image/jpeg") { filename = e.CommandArgument.ToString() + ".jpg"; } else if (newImage.PostedFile.ContentType == "image/png") { filename = e.CommandArgument.ToString() + ".png"; } else if (newImage.PostedFile.ContentType == "image/gif") { filename = e.CommandArgument.ToString() + ".gif"; } if (File.Exists(path + e.CommandArgument.ToString() + ".jpg")) { File.Delete(path + e.CommandArgument.ToString() + ".jpg"); } if (File.Exists(path + e.CommandArgument.ToString() + ".png")) { File.Delete(path + e.CommandArgument.ToString() + ".png"); } if (File.Exists(path + e.CommandArgument.ToString() + ".gif")) { File.Delete(path + e.CommandArgument.ToString() + ".gif"); } newImage.SaveAs(path + filename); } String scr = "<script> alert('Image Updated');window.location='ImageSlider.aspx'; </script>"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "error", scr); } catch (Exception ex) { ErrorReportBAL ErrorReport = new ErrorReportBAL(); ErrorReport.SendErrorReport("ImageSlider", ex.ToString()); String scr = "<script> alert('Some error has occured , please try again later '); </script>"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "error", scr); } }
protected void btnDelete_Command(object sender, CommandEventArgs e) { try { sliderfunctions.DeleteImage(Convert.ToInt32(e.CommandArgument)); String path = Server.MapPath("~/Images/sliderImages/"); if (File.Exists(path + e.CommandArgument.ToString() + ".jpg")) { File.Delete(path + e.CommandArgument.ToString() + ".jpg"); } if (File.Exists(path + e.CommandArgument.ToString() + ".png")) { File.Delete(path + e.CommandArgument.ToString() + ".png"); } if (File.Exists(path + e.CommandArgument.ToString() + ".gif")) { File.Delete(path + e.CommandArgument.ToString() + ".gif"); } String scr = "<script> alert('Image Deleted'); window.location='ImageSlider.aspx'; </script>"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "delete message", scr); } catch (Exception ex) { ErrorReportBAL ErrorReport = new ErrorReportBAL(); ErrorReport.SendErrorReport("ImageSlider", ex.ToString()); String scr = "<script> alert('Some error has occured , please try again later '); </script>"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "error", scr); } }
protected void btnAddNewImage_Click(object sender, EventArgs e) { try { if (NewImageUpload.HasFile && (NewImageUpload.PostedFile.ContentType == "image/jpeg" || NewImageUpload.PostedFile.ContentType == "image/png" || NewImageUpload.PostedFile.ContentType == "image/gif")) { String newimagename = sliderfunctions.NextImageName(NewImageUpload.FileName); String path = Server.MapPath("~/Images/sliderImages/"); String fullimgpath = path + newimagename; if (File.Exists(fullimgpath)) { File.Delete(fullimgpath); } NewImageUpload.SaveAs(fullimgpath); sliderfunctions.SaveNewImage(newimagename); Response.Redirect("~/Admin/ImageSlider.aspx"); } } catch (Exception ex) { ErrorReportBAL reportError = new ErrorReportBAL(); reportError.SendErrorReport("ImageSlider.aspx", ex.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { int Nid = 0; try { Nid = Convert.ToInt32(Request.QueryString["id"]); if (Nid == 0) { loadNews(); } else { displayNewsByID(Nid); } } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("News.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
protected void dlBlogComments_ItemDataBound(object sender, DataListItemEventArgs e) { //LinkButton delete_button = (LinkButton)dlBlogComments.FindControl("lnkbtnDelete"); try { if (Convert.ToInt32(DataBinder.Eval(e.Item.DataItem, "poster_id")) == Convert.ToInt32(Session["user_id"]) && Convert.ToInt32(DataBinder.Eval(e.Item.DataItem, "is_admin")) == 0) { System.Web.UI.HtmlControls.HtmlGenericControl divoptions = (System.Web.UI.HtmlControls.HtmlGenericControl)e.Item.FindControl("div_blog_comment_options"); LinkButton DeleteButton = new LinkButton(); DeleteButton.ID = "lnkbtnDelete"; DeleteButton.Command += new CommandEventHandler(lnkbtnDelete_Command); DeleteButton.CommandArgument = DataBinder.Eval(e.Item.DataItem, "comment_id").ToString(); DeleteButton.CssClass = "lnkbtnDelete"; DeleteButton.Text = "Delete"; divoptions.Controls.Add(DeleteButton); ScriptManager1.RegisterAsyncPostBackControl(DeleteButton); //add the profile pic of the commenter } Image imgpp = (Image)e.Item.FindControl("img_commenter_pic"); imgpp.ImageUrl = GetImageUrl(Convert.ToInt32(DataBinder.Eval(e.Item.DataItem, "poster_id")), Convert.ToInt16(DataBinder.Eval(e.Item.DataItem, "is_admin"))); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("ViewPost.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
protected void btnSendPassword_Click(object sender, EventArgs e) { try { String email = txtemail.Value.ToString(); if (sendmail.ForgotPassword(email) == 1) { lblMessage.Text = "Your password has been mailed to your email id"; lblMessage.Style.Value = "color:rgb(0,0,0)"; txtemail.Value = ""; } else { txtemail.Value = ""; lblMessage.Text = "Email id is not registered...!"; lblMessage.Style.Value = "color:rgb(255,0,0)"; } } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("ForgetPassword.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
//protected void EnableTb_Click(object sender, EventArgs e) //{ // tbUserPassword.ReadOnly = false; // tbNewPassword.ReadOnly = false; //} protected void UpdateData_Click(object sender, EventArgs e) { try { user_infoBO ubo = new user_infoBO(); UserFunctionsBAL ubal = new UserFunctionsBAL(); string filename = ""; ubo.user_id = Convert.ToInt32(Session["user_id"]); ubo.first_name = tbUserFirstName.Value; ubo.last_name = tbUserLastName.Value; ubo.city = tbUserCity.Value; ubo.country = tbUserCountry.Value; if (tbUserPassword.Value.Trim() != "" && tbNewPassword.Value.Trim() != "") { ubo.password = tbUserPassword.Value; if (ubal.PasswordMatch(ubo)) { ubo.password = tbNewPassword.Value; filename = ImgUpload(); ubo.profile_pic = "/Images/userprofilepic/" + filename; ubal.ProfileUpdate(ubo); StatusLabel.Text = "Profile Successfuly updated"; } else { StatusLabel.Text = "old password not match"; } } else { if (ImgUpload() == null) { StatusLabel.Text = "image is not valid"; } else { filename = ImgUpload(); ubo.profile_pic = "/Images/userprofilepic/" + filename; ubo.password = ubal.getPassword(ubo); ubal.ProfileUpdate(ubo); StatusLabel.Text = "Profile Successfuly updated"; } } Response.Redirect("~/UserProfileEdit.aspx"); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("UserProfileEdit.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
protected void bntJoinMe_Click(object sender, EventArgs e) { try { UserFunctionsBAL registeruser = new UserFunctionsBAL(); user_infoBO user_info = new user_infoBO(); String email_id = user_info.email_id = txtEmail.Value.ToString(); user_info.first_name = txtFname.Value.ToString(); user_info.last_name = txtLname.Value.ToString(); user_info.country = ListCountry.SelectedValue.ToString(); user_info.city = StateLoad.SelectedValue.ToString(); user_info.password = txtPassword.Value.ToString(); if (rdoBlogger.Checked == true) { user_info.user_type = 1; } else { user_info.user_type = 0; } int check = registeruser.NewUserRegister(user_info); if (check == 1) { Response.Write("<script type='text/javascript'> alert('Email ID Already Registered ... !') </script>"); } else if (check == 2) { //Response.Write("<script>alert('Thanks For Joining Us ... !'); </script>"); registeruser.JoinUsMail(email_id); String okmessage = "<script type='text/javascript'> alert('Thank You For Joining Us'); </script>"; Page.ClientScript.RegisterStartupScript(this.GetType(), "okmessage", okmessage); //Response.Redirect("~/sign_in.aspx"); } txtEmail.Value = ""; txtFname.Value = ""; txtLname.Value = ""; rdoBlogger.Checked = false; rdoVolunteer.Checked = false; } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("JoinUs.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
//protected void load_all_subscibed_ID() //{ // event_subscriberBAL ebal = new event_subscriberBAL(); // event_subscriberBO ebo = new event_subscriberBO(); // ebo.user_id = Convert.ToInt32(Session["user_id"]); // DataSet dtUserRegistered = new DataSet(); // dtUserRegistered = ebal.eventSubscriber_getSubscibedEventID_DAL(ebo); //} protected void eventLoad_ItemDataBound(object sender, DataListItemEventArgs e) { try { event_subscriberBAL event_bal = new event_subscriberBAL(); event_subscriberBO event_bo = new event_subscriberBO(); if (Session["user_id"] != null) { event_bo.user_id = Convert.ToInt32(Session["user_id"]); event_bo.event_id = Convert.ToInt32(DataBinder.Eval(e.Item.DataItem, "event_id")); ImageButton imgbtn_subscribe_unsubs = new ImageButton(); imgbtn_subscribe_unsubs.CssClass = "subscribe_btn"; if (event_bal.eventSubscriber_getEvent_id_DAL(event_bo)) //already subscribbed make the unsubscribe button { imgbtn_subscribe_unsubs.ImageUrl = "img/unsubscibe.png"; imgbtn_subscribe_unsubs.Command += new CommandEventHandler(Unsubscribe_Command); imgbtn_subscribe_unsubs.CommandArgument = DataBinder.Eval(e.Item.DataItem, "event_id").ToString(); } else //not subcribbed to any event { imgbtn_subscribe_unsubs.ImageUrl = "img/subscibe.png"; imgbtn_subscribe_unsubs.Command += new CommandEventHandler(subscribeToIvent_Command); imgbtn_subscribe_unsubs.CommandArgument = DataBinder.Eval(e.Item.DataItem, "event_id").ToString(); } System.Web.UI.HtmlControls.HtmlGenericControl div_subscribe = (System.Web.UI.HtmlControls.HtmlGenericControl)e.Item.FindControl("subscribe"); div_subscribe.Controls.Add(imgbtn_subscribe_unsubs); } else { ImageButton imgbtn_subscribe = new ImageButton(); imgbtn_subscribe.OnClientClick = "SignInMessage();"; imgbtn_subscribe.CssClass = "subscribe_btn"; imgbtn_subscribe.ImageUrl = "img/subscibe.png"; System.Web.UI.HtmlControls.HtmlGenericControl div_subscribe = (System.Web.UI.HtmlControls.HtmlGenericControl)e.Item.FindControl("subscribe"); div_subscribe.Controls.Add(imgbtn_subscribe); } } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("Event.aspx", ex.ToString()); //Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
protected void dlBlog_ItemDataBound(object sender, DataListItemEventArgs e) { try { Image imgpp = (Image)e.Item.FindControl("img_pp"); imgpp.ImageUrl = GetImageUrl(Convert.ToInt32(DataBinder.Eval(e.Item.DataItem, "poster_id")), Convert.ToInt16(DataBinder.Eval(e.Item.DataItem, "is_admin"))); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("Blog.aspx", ex.ToString()); } }
protected void Listcomments() { try { dlBlogComments.DataSource = blogviewer.LoadBlogPostComments(id); dlBlogComments.DataBind(); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("ViewPost.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
protected void lnkbtnDelete_Command(object sender, CommandEventArgs e) { try { blogviewer.DeleteBlogPostComments(Convert.ToInt32(e.CommandArgument)); Listcomments(); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("ViewPost.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
protected void Page_Load(object sender, EventArgs e) { if (!(Page.IsPostBack)) { try { dlBlog.DataSource = blog.ListBlog(); dlBlog.DataBind(); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("Blog.aspx", ex.ToString()); } } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["user_id"] == null && Session["user_login_social"] == null) { Response.Redirect("~/Default.aspx"); } else { if (Session["user_login_social"] == "yes") { if (Session["user_login_type"].ToString() == "GOOGLE") { Session.Abandon(); // Response.Write("<script>googleLogout();</script>"); //Page.ClientScript.RegisterStartupScript(this.GetType(), "gl", "googleLogout()", true); Response.Redirect("https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=http://hopeintomorrow.org"); } if (Session["user_login_type"].ToString() == "FACEBOOK") { Session.Abandon(); //Response.Write("<script>facebookLogout();</script>"); Page.ClientScript.RegisterStartupScript(this.GetType(), "bf", "facebookLogout()", true); //Response.Redirect("https://www.facebook.com/logout.php?next=http://hopeintomorrow.org"); } Session.Abandon(); } else //user has logged in using hit credentials not any social media { Session.Abandon(); Response.Redirect("~/Default.aspx"); } } } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("Logout.aspx", ex.ToString()); //Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["viewBlog_id"] == null) { Response.Redirect("~/Blog.aspx"); } else { try { id = Convert.ToInt32(Convert.ToInt32(Session["viewBlog_id"])); //Session["viewBlog_id"] = null; blog = blogviewer.UserBlogViewer(id); if (blog == null) { div_blog_title.InnerText = "Sorry, But the blog is not present"; } else { div_blog_title.InnerText = Server.HtmlDecode(blog.blog_title.ToString()); div_blog_date_time.InnerText = Server.HtmlDecode((blog.date_time_of_post).ToLongDateString()); div_blog_body.InnerHtml = Server.HtmlDecode(blog.blog_content.ToString()); spn_posterName.InnerText = Server.HtmlDecode((blogviewer.UserNameFetch(blog.poster_id)).ToString()); //getting the admin name from admin_id spn_timeOfPost.InnerText = Server.HtmlDecode(blog.date_time_of_post.ToShortTimeString()); //lading the comments Listcomments(); if (!(Page.IsPostBack)) { blogviewer.SetBlogViewCount(Convert.ToInt32(Session["viewBlog_id"])); } } } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("ViewPost.aspx", ex.ToString()); //Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } } }
protected void Page_Load(object sender, EventArgs e) { int Eid = 0; try { Eid = Convert.ToInt32(Request.QueryString["id"]); displayEventByID(Eid); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("EventView.aspx", ex.ToString()); String scr = "<script type='text/javascript'> alert('Some Error Occured , Sorry for Inconvenience'); </script> "; Page.ClientScript.RegisterStartupScript(this.GetType(), "script1", scr); } }
public void load_news() { newsBO n_bo = new newsBO(); newsBAL n_bal = new newsBAL(); try { DataSet ds = n_bal.news_top3_BAL_view(); news.DataSource = ds; news.DataBind(); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("UserProfleHome.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
protected void loadNews() { newsBAL news_bal = new newsBAL(); newsBO news_bo = new newsBO(); try { DataSet ds = news_bal.news_DAL_viewALL(); newsLoad.DataSource = ds; newsLoad.DataBind(); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("News.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
protected void Page_Load(object sender, EventArgs e) { string socialType = Request["socialType"]; string txtEmail = Request["email"]; string name = Request["name"]; Boolean social = Request["social"].ToString() == "yes" ? true : false; string profile_pic = Request["image"]; Response.Write(socialType + txtEmail + name + social + profile_pic); try { user_infoBO social_login_info = new user_infoBO(); UserFunctionsBAL usersignup = new UserFunctionsBAL(); social_login_info.email_id = txtEmail; social_login_info.first_name = name; social_login_info.social_type = socialType; social_login_info.social = social; social_login_info.profile_pic = profile_pic; if (usersignup.UserSignUp(social_login_info)) { Session["user_id"] = Convert.ToInt32(usersignup.UserIdFetch(social_login_info.email_id)); Session["user_login_social"] = "yes"; Session["user_login_type"] = socialType; Session["user_pp"] = profile_pic; //Response.Write(Session["user_pp"].ToString()); Response.Redirect("~/UserProfileHome.aspx"); } //else //{ // lblErrorMessage.Text = "Username Or Password Incorrect...!"; //} } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("SocialLogin.aspx", ex.ToString()); Response.Write("<script type='text/javascript'> alert('Some Error Occured \n Please try again later'); </script>"); } }
protected void displaynewsByID(int NewsID) { newsBAL news_bal = new newsBAL(); newsBO news_bo = new newsBO(); news_bo.news_id = NewsID; try { DataTable dt = news_bal.news_DAL_view_id(news_bo); newsLoad.DataSource = dt; newsLoad.DataBind(); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("NewsView.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
private void loadcountry() { try { DataTable dt = (DataTable)((DataSet)continent.continent_retriveBAL()).Tables[0]; ListCountry.DataSource = dt; ListCountry.DataTextField = "country"; ListCountry.DataValueField = "id"; ListCountry.DataBind(); ListCountry.Items.Insert(0, new ListItem("Select Country", "0")); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("JoinUs.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
public void LoadLatestEvents() { AdminFunctionsBAL viewTop5events = new AdminFunctionsBAL(); if (!(Page.IsPostBack)) { try { top5EventsDL.DataSource = viewTop5events.TopFiveEvents(); top5EventsDL.DataBind(); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("UserProfileHome.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } } }
protected void displayEventByID(int EventID) { AdminFunctionsBAL adminBlogFunctions = new AdminFunctionsBAL(); eventsBO eventsbo = new eventsBO(); eventsbo.event_id = EventID; try { DataSet dt = adminBlogFunctions.event_retrive(eventsbo); eventLoad.DataSource = dt; eventLoad.DataBind(); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("EventView.aspx", ex.ToString()); String scr = "<script type='text/javascript'> alert('Some Error Occured , Sorry for Inconvenience'); </script> "; Page.ClientScript.RegisterStartupScript(this.GetType(), "script1", scr); } }
protected void displayEventByID(int EventID) { AdminFunctionsBAL adminBlogFunctions = new AdminFunctionsBAL(); eventsBO eventsbo = new eventsBO(); eventsbo.event_id = EventID; try { DataSet dt = adminBlogFunctions.event_retrive(eventsbo); eventLoad.DataSource = dt; eventLoad.DataBind(); } catch (Exception ex) { //throw; ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("Event.aspx", ex.ToString()); Response.Write("<script>alert('Sorry for inconvenience');</script>"); } }
protected void fillFundDetails() { try { fundsBO fbo = new fundsBO(); funds_BAL fbal = new funds_BAL(); fbo.email_id = TB_Email.Value; fbo.first_name = TB_FirstName.Value; fbo.last_name = TB_LastName.Value; fbo.unknown_user = Convert.ToBoolean(usertype); fbal.funds_DAL_insert(fbo); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("DonateForm.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
protected void ListCountry_SelectedIndexChanged(object sender, EventArgs e) { try { int cid = Convert.ToInt32(ListCountry.SelectedValue); DataView dv = continent.region_retriveBAL().DefaultView; dv.RowFilter = "state_id='" + cid + "'"; StateLoad.DataSource = dv; StateLoad.DataTextField = "state"; StateLoad.DataValueField = "State_id"; StateLoad.DataBind(); StateLoad.Items.Insert(0, new ListItem("Select State", "0")); } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("JoinUs.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }