// ============================ чтение таблицы а оп ============================================== void getGrid() { GlvBegDat = (DateTime)Session["GlvBegDat"]; GlvEndDat = (DateTime)Session["GlvEndDat"]; // localhost.Service1Soap ws = new localhost.Service1SoapClient(); // DataSet ds = new DataSet("Spr000"); // GlvDocIdn = Convert.ToInt32(Session["GLVDOCIDN"]); DataSet ds = new DataSet(); string connectionString = WebConfigurationManager.ConnectionStrings[MdbNam].ConnectionString; // создание соединение Connection SqlConnection con = new SqlConnection(connectionString); // создание команды SqlCommand cmd = new SqlCommand("SELECT TabDoc.*,SprBuxKdr.FI AS BUX, (CASE WHEN ISNULL(TabDoc.DOCFLGVIP, 0)= 0 THEN '' ELSE '+' END) AS FLG " + "FROM TabDoc LEFT OUTER JOIN SprBuxKdr ON dbo.TabDoc.DOCBUX = dbo.SprBuxKdr.BuxKod " + "WHERE TabDoc.DOCFRM =" + BuxFrm + " AND TabDoc.DOCTYP = 'ПРФ' " + //AND DOCDAT>='" + GlvBegDat + "' AND DOCDAT<='" + GlvEndDat + " ORDER BY TabDoc.DOCDAT", con); con.Open(); // создание DataAdapter SqlDataAdapter da = new SqlDataAdapter(cmd); // заполняем DataSet из хран.процедуры. da.Fill(ds, "GetDocNum"); con.Close(); // ds.Merge(ws.ComDocGet(MdbNam, BuxSid, BuxFrm, GlvDocTyp, GlvBegDat, GlvEndDat)); GridDoc.DataSource = ds; GridDoc.DataBind(); }
// ============================ чтение таблицы а оп ============================================== void getGrid() { GlvBegDat = (DateTime)Session["GlvBegDat"]; GlvEndDat = (DateTime)Session["GlvEndDat"]; localhost.Service1Soap ws = new localhost.Service1SoapClient(); DataSet ds = new DataSet("Spr000"); ds.Merge(ws.ComDocGet(MdbNam, BuxSid, BuxFrm, GlvDocTyp, GlvBegDat, GlvEndDat)); GridDoc.DataSource = ds; GridDoc.DataBind(); }
protected void btnSear_Click(object sender, EventArgs e) { string strSearch = ""; if (!string.IsNullOrWhiteSpace(lstSEQNO.Text)) { strSearch += string.Format(" and seqno like '%{0}%'", lstSEQNO.Text); } if (!string.IsNullOrWhiteSpace(lstFLAG.SelectedValue)) { strSearch += string.Format(" and flag = '{0}'", lstFLAG.SelectedValue); } if (!string.IsNullOrWhiteSpace(dpkDATE1.Text)) { strSearch += string.Format(" AND TRUNC(YHRQ) >= TO_DATE('{0}','YYYY-MM-DD')", dpkDATE1.Text); } if (!string.IsNullOrWhiteSpace(dpkDATE2.Text)) { strSearch += string.Format(" AND TRUNC(YHRQ) <= TO_DATE('{0}','YYYY-MM-DD')", dpkDATE2.Text); } if (!string.IsNullOrWhiteSpace(lstDEPTID.SelectedValue)) { strSearch += string.Format(" and deptid = '{0}'", lstDEPTID.SelectedValue); } if (!string.IsNullOrWhiteSpace(lstYHY.SelectedValue)) { strSearch += string.Format(" and yhy = '{0}'", lstYHY.SelectedValue); } if (!string.IsNullOrWhiteSpace(strSearch)) { strDocSql += strSearch; } strDocSql += " ORDER BY LRRQ DESC"; DataTable dtBill = new DataTable(); dtBill = DbHelperOra.Query(strDocSql).Tables[0]; GridDoc.DataSource = dtBill; GridDoc.DataBind(); }
protected override void billClear() { PubFunc.FormDataClear(Formlis); GridDoc.DataSource = null; GridDoc.DataBind(); }
protected void btnBuscar_Click(object sender, EventArgs e) { GridDoc.DataBind(); GridDoc.Visible = false; GridDoc.Visible = true; }