示例#1
0
 protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     try
     {
         if (e.CommandName.Equals("delete"))
         {
             string id = e.CommandArgument.ToString();
             if (ff.Execute("delete from stock where id=" + id.Trim()))
             {
                 ScriptManager.RegisterStartupScript(this, GetType(), "alert", "alert('Stock deleted successfully... !')", true);
                 FillData();
             }
         }
         else
         if (e.CommandName.Equals("edit"))
         {
             string[] str = e.CommandArgument.ToString().Split('|');
             Label1.Text   = str[0].ToString();
             txtitmnm.Text = str[1].ToString();
             string[] str1 = str[2].ToString().Split(' ');
             txtqua.Text = str1[0].ToString();
             ddluni.SelectedItem.Text = str1[1].ToString();
             txtpri.Text = str[3].ToString();
             MPE1.Show();
         }
     }
     catch (Exception)
     {
     }
 }
示例#2
0
        protected void lbViewQuiz_Click(object sender, EventArgs e)
        {
            LinkButton  linkUpdate = sender as LinkButton;
            GridViewRow grid       = (GridViewRow)linkUpdate.NamingContainer;
            string      tempID     = gvIssuedQuizes.DataKeys[grid.RowIndex].Value.ToString();

            ViewState["tempId"] = tempID;

            RenderXML RX = new RenderXML();

            DataSet ds = RX.XMLContent(tempID);

            XmlDoc.LoadXml(ds.Tables[0].Rows[0]["XmlFile"].ToString());

            ns = new XmlNamespaceManager(XmlDoc.NameTable);
            ns.AddNamespace("ns", "urn:Question-Schema");
            string      xpath    = "/ns:Quiz";
            XmlNodeList QuizNode = XmlDoc.SelectNodes(xpath, ns);

            DLExamDemo.DataSource = QuizNode;
            DLExamDemo.DataBind();
            DLExamDemoFillBlanks.DataSource = QuizNode;
            DLExamDemoFillBlanks.DataBind();
            DLExamDemoTrueFalse.DataSource = QuizNode;
            DLExamDemoTrueFalse.DataBind();
            MPE1.Show();
        }
 protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     try
     {
         if (e.CommandName.Equals("delete"))
         {
             string id = e.CommandArgument.ToString();
             if (ff.Execute("delete from menucategory where ctgid=" + id.Trim()))
             {
                 ScriptManager.RegisterStartupScript(this, GetType(), "alert", "alert('Category deleted successfully... !')", true);
                 FillCategory();
             }
         }
         else
         if (e.CommandName.Equals("edit"))
         {
             string[] str = e.CommandArgument.ToString().Split('|');
             Label1.Text = str[0].ToString();
             txtctg.Text = str[1].ToString();
             MPE1.Show();
         }
     }
     catch (Exception)
     {
     }
 }
示例#4
0
        private void ViewQuizPopUp()
        {
            RenderXML RX = new RenderXML();

            DataSet ds = RX.XMLContent(ddlVersion.SelectedValue.ToString());

            XmlDoc.LoadXml(ds.Tables[0].Rows[0]["XmlFile"].ToString());

            ns = new XmlNamespaceManager(XmlDoc.NameTable);
            ns.AddNamespace("ns", "urn:Question-Schema");
            string      xpath    = "/ns:Quiz";
            XmlNodeList QuizNode = XmlDoc.SelectNodes(xpath, ns);

            //string x= XmlDoc.InnerXml;
            //DataSet ds1 = new DataSet();
            //ds1.ReadXml(new StringReader(x));
            // string serverPath = Server.MapPath(".") + "\\XSLT_Files\\";

            //  XmlDataSource xmlDS = new XmlDataSource();
            //  xmlDS.Data = XmlDoc.OuterXml;
            //xmlDS.TransformFile = serverPath + "QuestionX.xslt";
            // xmlDS.XPath = "Quiz";

            DLExamDemo.DataSource = QuizNode;
            DLExamDemo.DataBind();
            DLExamDemoFillBlanks.DataSource = QuizNode;
            DLExamDemoFillBlanks.DataBind();
            DLExamDemoTrueFalse.DataSource = QuizNode;
            DLExamDemoTrueFalse.DataBind();
            MPE1.Show();
        }
    protected void SDSYorum_Updated(object sender, SqlDataSourceStatusEventArgs e)
    {
        if (e.Exception == null)
        {
            Snlg_Hata.ziyaretci.HataGosterBasarili("Değişiklikler kaydedildi.", false);
            MPE1.Hide();
            GVYorumlar.DataBind();
            if (((CheckBox)FVYorum.FindControl("CBMail")).Checked)
            {
                Snlg_DBConnect vt = new Snlg_DBConnect(true);
                try
                {
                    DataTable DtMail = vt.DataTableOlustur("snlg_V1.zsp_EPostaSablonGetir_Smtp", CommandType.StoredProcedure, new Snlg_DBParameter[2] {
                        new Snlg_DBParameter("@Anahtar", SqlDbType.VarChar, "makaleYorumOnay"), new Snlg_DBParameter("@Ozelifadeler", SqlDbType.VarChar, "$#url_adresi#$")
                    });

                    Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[1];
                    DBPrms[0] = new Snlg_DBParameter("@YId", SqlDbType.Int, e.Command.Parameters["@YId"].Value.ToString());
                    SqlDataReader sdr = vt.DBReaderOlustur("snlg_V1.msp_MakaleYorumCevapEposta", CommandType.StoredProcedure, DBPrms);

                    if (DtMail.Rows.Count > 0)
                    {//mail gönder
                        DataRow   drMail = DtMail.Rows[0];
                        Snlg_Mail eposta = new Snlg_Mail();
                        while (sdr.Read())
                        {
                            if (!string.IsNullOrEmpty(drMail["Kimden"].ToString()) && !string.IsNullOrEmpty(drMail["SmtpHost"].ToString()))
                            {
                                eposta.smtp             = new System.Net.Mail.SmtpClient(drMail["SmtpHost"].ToString(), Convert.ToInt32(drMail["SmtpPort"]));
                                eposta.smtp.EnableSsl   = Convert.ToBoolean(drMail["SSL_"]);
                                eposta.smtp.Credentials = new System.Net.NetworkCredential(drMail["Kimden"].ToString(), drMail["SmtpPsw"].ToString());
                            }
                            try
                            {//ilgili yorumculra mesaj
                                eposta.Gonder(drMail["Kimden"].ToString(), drMail["KimdenIsim"].ToString(), sdr["Kime"].ToString(), drMail["Konu"].ToString(), drMail["Mesaj"].ToString().Replace("$#url_adresi#$", Request.Url.Host + sdr["SeoUrl"].ToString()));
                            }
                            catch { }
                        }
                        sdr.Close();
                    }
                }
                catch { }
                vt.Kapat();
            }
        }
        else
        {
            MPE1.Hide();
            Snlg_Hata.ziyaretci.ExceptionLogla(e.Exception);
            e.ExceptionHandled = true;
            Snlg_Hata.ziyaretci.HataGosterHatali("Beklenmeyen bir hata oluştu.", true);
        }
    }
示例#6
0
 protected void txtdishcook_TextChanged(object sender, EventArgs e)
 {
     try
     {
         int n, m, j;
         n = Convert.ToInt32(txtnoofdish.Text.Trim());
         m = Convert.ToInt32(txtdishcook.Text.Trim());
         txtremains.Text = (n - m).ToString();
         MPE1.Show();
     }
     catch (Exception)
     {
     }
 }
示例#7
0
 protected void SDSYorum_Updated(object sender, SqlDataSourceStatusEventArgs e)
 {
     if (e.Exception == null)
     {
         Snlg_Hata.ziyaretci.HataGosterBasarili("Değişiklikler kaydedildi.", false);
         MPE1.Hide();
         GVYorumlar.DataBind();
     }
     else
     {
         Snlg_Hata.ziyaretci.ExceptionLogla(e.Exception);
         e.ExceptionHandled = true;
         Snlg_Hata.ziyaretci.HataGosterHatali("Beklenmeyen bir hata oluştu.", true);
     }
 }
示例#8
0
 protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     try
     {
         Label1.Text      = "";
         txtdishcook.Text = "";
         txtremains.Text  = "";
         txtnoofdish.Text = "";
         string[] str = e.CommandArgument.ToString().Trim().Split('|');
         Label1.Text      = str[0];
         Label2.Text      = str[1];
         txtnoofdish.Text = str[2];
         MPE1.Show();
     }
     catch (Exception)
     {
     }
 }
示例#9
0
 protected void GVYorumlar_SelectedIndexChanged(object sender, EventArgs e)
 {
     FVYorum.DataBind();
     MPE1.Show();
 }
示例#10
0
 protected void btnPopUpClose_Click(object sender, EventArgs e)
 {
     MPE1.Hide();
 }