private void button2_Click(object sender, EventArgs e) { try { string productname = "All", FromDate = dateTimePicker1.Text, Todate = dateTimePicker2.Text, IN02 = "All", IN01 = "All", IN04 = "All", Type = "All"; if (txt_product.Text.Trim() != "") { productname = txt_product.Text.Trim(); } if (ddl_pa.SelectedValue.ToString().Trim() != "") { IN02 = ddl_pa.SelectedValue.ToString().Trim(); } if (ddl_Pr.SelectedValue.ToString().Trim() != "") { IN01 = ddl_Pr.SelectedValue.ToString().Trim(); } if (txt_batn.Text.Trim() != "") { IN04 = txt_batn.Text.Trim(); } if (ddl_Type.SelectedValue.ToString().Trim() != "") { Type = ddl_Type.SelectedValue.ToString().Trim(); } productdata.product productservice = new productdata.product(); //here I need to call the the web method and pass parameters } catch (Exception ex) { MessageBox.Show(ex.Message); }
[WebMethod] public DataSet GetData(string productname, string FromDate, string Todate, string IN02, string IN01, string IN04, string Type) { DataSet ds = objcon.GetDataSet("exec SP0128"); return ds; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)