protected void btnSearch_Click(object sender, EventArgs e) { Dispatch dispatch = new Dispatch(); dispatch.OrderDate = (Convert.ToDateTime(txtOrderDate.Text)).ToString("dd-MM-yyyy"); dispatch.RouteID = Convert.ToInt32(dpagentRoute.SelectedItem.Value); dispatch.CategoryId = Convert.ToInt32(dpCategory.SelectedItem.Value); DispatchData dispatchData = new DispatchData(); DataSet DS = new DataSet(); DS = dispatchData.GetDispatchSearch(dispatch); if (!Comman.Comman.IsDataSetEmpty(DS)) { //int count = Convert.ToInt32(DS.Tables[1].Rows[0]["Id"]); //count = count + 1; //txtRouteCode.Text = string.Format("R{0:0000}", count); rpRouteList.DataSource = DS; rpRouteList.DataBind(); rpRouteList.Visible = true; if (DS.Tables[0].Rows.Count != 0) { btnSubmitModal.Visible = true; btnPrintSummary.Visible = false; btnPrintGatePass.Visible = false; } uprouteList.Update(); //int type = 0; //type = Convert.ToInt32(dpCategory.SelectedItem.Value); string nm = GlobalInfo.UserName.ToString(); DS.WriteXml(Server.MapPath("~/Tabs/Dispatch/temp" + nm + ".xml")); } }