// Int32 DaysCount = Convert.ToInt32(ConfigurationManager.AppSettings["No_Of_Days"]); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // ToDate = DateTime.Now; // FromDate = DateTime.Now; // txtfrmdate.Text = ToDate.ToString(); //txttodate.Text = FromDate.ToString(); //Session.Remove("lstcountry"); //Session.Remove("listconsign"); //Session.Remove("MailRemarks"); //Session.Remove("listMail"); //Session.Remove("pax"); Session.RemoveAll(); int LocId = LoggedInUser.UserLocation.LocationId; BindDropDown(ddlcountry, "CountryName", "COUNTRY_ID", BL.ReadCountry()); int userId = LoggedInUser.UserTypeId; if (userId == Convert.ToInt32(UserType.Admin)) { LocId = 0; BindDropDown(ddlAgent, "AgentName", "AgentId", agentBal.ReadUsers("", LocId, 0)); } else { BindDropDown(ddlAgent, "AgentName", "AgentId", agentBal.ReadUsers("", LocId, 0)); } } }
protected void btnsearch_Click1(object sender, EventArgs e) { AgentBAL agntBal = new AgentBAL(); List <Agent> lstAgent = new List <Agent>(); int LocId = basePage.LoggedInUser.UserLocation.LocationId; int userId = basePage.LoggedInUser.UserTypeId; if (userId == Convert.ToInt32(UserType.Admin)) { LocId = 0; lstAgent = agntBal.ReadUsers(txtname.Text, LocId, 0); } else { lstAgent = agntBal.ReadUsers(txtname.Text, LocId, basePage.LoggedInUser.AgentId); } if (lstAgent.Count > 0) { LstAgent.DataSource = lstAgent; LstAgent.DataTextField = "AgentName"; LstAgent.DataValueField = "AgentId"; LstAgent.DataBind(); System.Threading.Thread.Sleep(1000); //this.LstAgent.MouseDoubleClick += new MouseEventHandler(LstAgent_MouseDoubleClick); } else { Response.Write("<script type=\"text/javascript\">alert('Record Not Found');</script>"); } }
//protected void btn_search_Click1(object sender, EventArgs e) //{ // BindAgentDetails(); //} public void BindAgentDetails() { int LocId = basePage.LoggedInUser.UserLocation.LocationId; int userId = basePage.LoggedInUser.UserTypeId; Agent adAgentDom = new Agent(); List <Agent> adlst = new List <Agent>(); if (userId == Convert.ToInt32(UserType.Admin)) { //if (txt_search.Text == "") //{ // Response.Write("<script LANGUAGE='JavaScript' >alert('Please Enter Agent/City')</script>"); //} // else // { LocId = 0; adlst = adAgentBal.ReadUsers(txt_search.Text.Trim(), LocId, 0); // } } else { adlst = adAgentBal.ReadUsers(txt_search.Text.Trim(), LocId, 0); } //if (adlst.Count == 0) //{ // Response.Write("<script LANGUAGE='JavaScript' >alert('No Record Found')</script>"); //} gvDetails.DataSource = adlst; gvDetails.DataBind(); System.Threading.Thread.Sleep(500); txt_search.Text = ""; ddlStatus.SelectedIndex = -1; }
protected void btn_search_Click1(object sender, EventArgs e) { Agent adAgentDom = new Agent(); List <Agent> adlst = new List <Agent>(); adlst = adAgentBal.ReadUsers(txt_search.Text.Trim()); gvDetails.DataSource = adlst; gvDetails.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //Session.Remove("ConsignmentDetails"); //Session.Remove("NewMailRemarks"); //Session.Remove("consignmentEditpax"); //Session.Remove("pax"); //Session.Remove("paxAdditional"); //Session.Remove("VisaTypeOneId"); //Session.Remove("CurrentTable"); //Session.Remove("CurrentTable"); //Session.Remove("lstBillItem"); //Session.Remove("lstBillItemm"); //Session.Remove("lstBillItems"); //Session.Remove("billIdds"); //Session.Remove("billitem"); //Session.Remove("tempdata"); //Session.Remove("Type"); //Session.Remove("version"); Session.RemoveAll(); AgentBAL agntBal = new AgentBAL(); List <Agent> lstAgent = new List <Agent>(); int LocId = basePage.LoggedInUser.UserLocation.LocationId; int userId = basePage.LoggedInUser.UserTypeId; if (userId == Convert.ToInt32(UserType.Admin)) { LocId = 0; lstAgent = agntBal.ReadUsers("", LocId, 0); } else { lstAgent = agntBal.ReadUsers("", LocId, basePage.LoggedInUser.AgentId); } LstAgent.DataSource = lstAgent; LstAgent.DataTextField = "AgentName"; LstAgent.DataValueField = "AgentId"; LstAgent.DataBind(); } }