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) { } }
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) { } }
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(); }
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 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) { } }
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) { } }
protected void GVYorumlar_SelectedIndexChanged(object sender, EventArgs e) { FVYorum.DataBind(); MPE1.Show(); }