//public void LoadLots(string pageNo, string facilityid) //{ // LoadLots(Conversion.ParseInt(pageNo), Conversion.ParseInt(facilityid)); //} public void LoadLots(string pageNo, string facilityid = "0") { try { pnlLot.Visible = true; hdnidfaclityid.Value = facilityid; int pageSize = 5; gvLot.PageSize = pageSize; CurrentPage = Conversion.ParseInt(pageNo); //dvpopupfacilityinfo.Visible = true; DataSet ds1 = Facility.GetFacilityNameByFacilityId(Conversion.ParseInt(facilityid)); lblfacilityname.Text = ds1.Tables[0].Rows[0][0].ToString(); hdnfacilityname.Value = lblfacilityname.Text; hdnidfaclityid.Value = facilityid.ToString(); int count = 0; DataSet ds = Lots.getParkingLot(Conversion.ParseInt(pageNo), pageSize, UserOrganizationId, out count, null, Conversion.ParseInt(facilityid)); gvLot.DataSource = ds; gvLot.DataBind(); this.TotalItems = count; this.pgrLots.DrawPager(Conversion.ParseInt(pageNo), this.TotalItems, pageSize, MaxPagesToShow); } catch (Exception ex) { new SqlLog().InsertSqlLog(0, "Facility/Controls/FacilityLots.ascx.cs LoadLots", ex); } }
/// <summary> /// Lots Load Again Facility Id /// </summary> /// <param name="pageNo"></param> /// <param name="facilityid"></param> public void LoadLots(int pageNo, int facilityid = 0) { try { int pageSize = 5; gvLot.PageSize = pageSize; CurrentPage = pageNo; int count = 0; DataSet ds = Lots.getParkingLot(pageNo, pageSize, UserOrganizationId, out count, null, Conversion.ParseInt(hndfacilityId.Value)); gvLot.DataSource = ds; gvLot.DataBind(); this.TotalItems = count; this.pgrLots.DrawPager(pageNo, this.TotalItems, pageSize, MaxPagesToShow); } catch (Exception ex) { new SqlLog().InsertSqlLog(0, "AddLot.aspx LoadLots", ex); } }