//public int Haghighiid { get; set; } public void BindDD() { string hh = Personelid.ToString(); //DDStreetTypeid.DataSource = TaxiDAL.CatalogClass.GetListTypeID("12"); //DDStreetTypeid.DataTextField = "CatalogName"; //DDStreetTypeid.DataValueField = "CatalogValue"; //DDStreetTypeid.DataBind(); //DDTreeTypeId.DataSource = TaxiDAL.CatalogClass.GetListTypeID("16"); //DDTreeTypeId.DataTextField = "CatalogName"; //DDTreeTypeId.DataValueField = "CatalogValue"; //DDTreeTypeId.DataBind(); DDMantagheId.DataSource = TaxiDAL.CatalogClass.GetListTypeID("2"); DDMantagheId.DataTextField = "CatalogName"; DDMantagheId.DataValueField = "CatalogValue"; DDMantagheId.DataBind(); // BindPeyman(); //BindGrid(); DDPeymanid.DataSource = PeymanClass.GetList2(null, null, null); DDPeymanid.DataTextField = "PeymanName"; DDPeymanid.DataValueField = "PeymanID"; DDPeymanid.DataBind(); DDLicesnceTypeid.DataSource = LicensingTreeClass.GetList(null, null, null, null, null, null, null, null); DDLicesnceTypeid.DataTextField = "Title"; DDLicesnceTypeid.DataValueField = "Mojavezid"; DDLicesnceTypeid.DataBind(); }
protected void btnprint_Click1(object sender, EventArgs e) { DataSet ds = LicensingTreeClass.GetReportList(null, null, null, CtlFromDateToDate.FromDate, DDLicesnceTypeid.SelectedValue.ToString(), null, null, DDMantagheId.SelectedValue.ToString(), CtlFromDateToDate.ToDate); //ReportViewer1.ProcessingMode = ProcessingMode.Local; //ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Report/ReportTree/" + "Rp_License.rdlc"); ////if (Request.QueryString["RName"].ToString() == "Rp_ExplainPrice") //// ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Report/Rp_ExplainPrice.rdlc"); ////Customers dsCustomers = GetData("select top 20 * from customers"); ////ReportDataSource datasource = new ReportDataSource("Customers", dsCustomers.Tables[0]); //ReportViewer1.LocalReport.DataSources.Clear(); //// ddss.Tables[0].TableName = "DataSource1"; //ReportDataSource dsrep = new ReportDataSource("DataSet554", ds.Tables[0]); //ReportViewer1.LocalReport.DataSources.Add(dsrep); Session["ReportData"] = ds; //Response.Redirect("~/Report/ReportTree/ReportViewTree.aspx?RName=ReportTree/Rp_License"); MyIfarm.Visible = true; MyIfarm.Attributes.Add("src", "~/Report/ReportTree/ReportViewTree.aspx?RName=ReportTree/Rp_License"); }
protected void BtnSerach_Click1(object sender, EventArgs e) { DataSet ds = LicensingTreeClass.GetList(null, null, null, null, null, null, null, null); DataView dv = new DataView(ds.Tables[0]); String StrSort = Securenamespace.SecureData.CheckSecurity(ViewState["LicensingTree"].ToString()); if (StrSort != null) { dv.Sort = StrSort; } GridView1.DataSource = dv; GridView1.DataBind(); }
protected void BtnUpdate_Click1(object sender, EventArgs e) { int i = LicensingTreeClass.Update(TXTMojavezid.Text, lblHaghighiid.Text, lblPersonelID.Text, TXTMojavezDate.Text, DDLicesnceTypeid.SelectedValue.ToString(), TXTDesc.Text, TXTTitle.Text, DDMantagheId.SelectedValue.ToString()); if (i == 0) { LblMsg.ForeColor = System.Drawing.Color.Red; LblMsg.Text = "خطا"; } else { LblMsg.ForeColor = System.Drawing.Color.Green; LblMsg.Text = "ویرایش انجام شد"; BindGrid(); } }
protected void BtnInsert_Click(Object sender, System.EventArgs e) { int t = LicensingTreeClass.insert(lblHaghighiid.Text, lblPersonelID.Text, TXTMojavezDate.Text, DDLicesnceTypeid.SelectedValue.ToString(), TXTDesc.Text, TXTTitle.Text, DDMantagheId.SelectedValue.ToString());//,null, null, null, null, null, null, null); if (t == 0) { LblMsg.ForeColor = System.Drawing.Color.Red; LblMsg.Text = "خطا در ثبت"; } else { LblMsg.ForeColor = System.Drawing.Color.Green; LblMsg.Text = "ثبت انجام شد."; BindGrid(); } }
public void DeleteItem(object sender, System.EventArgs e) { String Mojavezid = ((HtmlAnchor)sender).HRef.ToString(); int i = LicensingTreeClass.Delete(Convert.ToInt32(Mojavezid)); if (i == 0) { LblMsg.Text = " error "; ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), Guid.NewGuid().ToString(), "alert('خطا در حذف');", true); } else { BindGrid(); } LightBox.Value = "0"; }
public void BindGrid() { DataSet ds = LicensingTreeClass.GetList(null, Haghighiid.ToString(), Personelid.ToString(), null, null, null, null, null); //DataView dv = new DataView(ds.Tables[0]); //if (Securenamespace.SecureData.CheckSecurity(ViewState["LicensingTree"].ToString()) == null) //{ // ViewState["LicensingTree"] = "Mojavezid Desc"; //} //dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["LicensingTree"].ToString()).ToString(); if (ds != null) { GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); } }
public void UpItem(object sender, EventArgs e) { String Mojavezid = ((HtmlAnchor)sender).HRef.ToString(); DataSet ds = LicensingTreeClass.GetList(Mojavezid, null, null, null, null, null, null, null); DataRow dr = ds.Tables[0].Rows[0]; TXTMojavezid.Text = Mojavezid; TXTTitle.Text = dr["Title"].ToString(); TXTDesc.Text = dr["Desc"].ToString(); TXTMojavezDate.Text = dr["date1"].ToString(); DDMantagheId.SelectedValue = dr["MantagheId"].ToString(); DDLicesnceTypeid.SelectedValue = dr["LicesnceTypeid"].ToString(); EmptyLight(); LightBox.Value = "1"; BtnInsert.Visible = false; BtnSerach.Visible = false; BtnUpdate.Visible = true; }