示例#1
0
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandName == "Delete")
            {
                BAL.remembrance objrem = new BAL.remembrance();
                objrem.rid = Convert.ToInt32(e.CommandArgument);
               
                DAL.general objGen = new DAL.general();
                objGen.deleteremembrancestatus(objrem);
            }
            else
            {
                if (e.CommandName == ViewState["Column"].ToString())
                {
                    if (ViewState["Sortorder"].ToString() == "ASC")
                        ViewState["Sortorder"] = "DESC";
                    else
                        ViewState["Sortorder"] = "ASC";
                }
                else
                {
                    ViewState["Column"] = e.CommandName;
                    ViewState["Sortorder"] = "ASC";
                }
            }
           
            bindData1();

        }
示例#2
0
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {

            string s = e.CommandName;
            if (e.CommandName == "Approved")
            {
                BAL.remembrance objrem = new BAL.remembrance();
                objrem.rid =Convert.ToInt32( e.CommandArgument);
                objrem.active = 0;
                DAL.general objGen = new DAL.general();
                objGen.updateremembrancestatus(objrem);

            }
            else if (e.CommandName == "Pending")
            {
                BAL.remembrance objrem = new BAL.remembrance();
                objrem.rid = Convert.ToInt32(e.CommandArgument);
                objrem.active = 1;
                DAL.general objGen = new DAL.general();
               bool f= objGen.updateremembrancestatus(objrem);
               DataSet ds = objGen.getdataset("select * from remembrancetdl where rid=" + Convert.ToInt32(e.CommandArgument) + "");
                if(f)
                {
                    try
                    {
                         string link="<a href='http://bmdnotices.com/remembrance-garden-book/viewremembrance.aspx?remembranceid="+Convert.ToString(e.CommandArgument) + "'>View the Page:</a>";
                         string mail = "<p align='left'>Dear Sir/Madam,<br><br> Your Remembrance Garden Page has now been approved and is ready for you to view on bmdnotices.com website.<br>Please feel free to start adding messages, tributes or in memorials directly on that Page.<br> You can also share this Page with your family and friends and encourage them to post their own tributes there. Should you, at any stage, wish to change the wording of the Page you created, please contact us be email and will we be happy to make these changes for you. <br> " + link + " <br><br><br> Thank You,  <br> BMDnotices Team";
                         objGen.Send_Mail(Convert.ToString(ds.Tables[0].Rows[0]["email"]), "BMDnotices Remembrance Garden Page Approved", mail, "");

                    }
                    catch (Exception)
                    {
                        
                     
                    }
                }
            }
            else if (e.CommandName == "Delete")
            {
                BAL.remembrance objrem = new BAL.remembrance();
                objrem.rid = Convert.ToInt32(e.CommandArgument);
               
                DAL.general objGen = new DAL.general();
                objGen.deleteremembrancestatus(objrem);
                objGen.deletetribut(Convert.ToInt32(e.CommandArgument));
            }
            else
            {
                if (e.CommandName == ViewState["Column"].ToString())
                {
                    if (ViewState["Sortorder"].ToString() == "ASC")
                        ViewState["Sortorder"] = "DESC";
                    else
                        ViewState["Sortorder"] = "ASC";
                }
                else
                {
                    ViewState["Column"] = e.CommandName;
                    ViewState["Sortorder"] = "ASC";
                }
            }
           
            bindData1();
        }