Exemple #1
0
 public LostFoundData GetLostFoundData(GetLostFoundData objGetLostFound)
 {
     try
     {
         AdminDAL             objAdminDAL = new AdminDAL();
         LostFoundData        ret         = new LostFoundData();
         List <LostFoundItem> lst         = objAdminDAL.GetLostFoundData(objGetLostFound);
         ret.LostId = lst;
         return(ret);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        private void BindGridWithFilter()
        {
            log4net.ILog logger = log4net.LogManager.GetLogger("File");
            try
            {
                AdminBLL         ws     = new AdminBLL();
                GetLostFoundData objReq = new GetLostFoundData();
                //getLocationIDByName(ddllocation.Text.Trim());
                string WhereClause = ReturnWhere();
                if (!string.IsNullOrEmpty(ddllocation.Text.Trim()))
                {
                    objReq.Location = ddllocation.Text;
                }
                if (!string.IsNullOrEmpty(txtdatefrom.Text))
                {
                    objReq.Date = txtdatefrom.Text;
                }

                if (!string.IsNullOrEmpty(ddlStatus.Text))
                {
                    objReq.LostStatus = ddlStatus.Text;
                }

                if (!string.IsNullOrEmpty(txtdatefrom.Text))
                {
                    if (string.IsNullOrEmpty(txtdateto.Text))
                    {
                        objReq.Date = txtdatefrom.Text;
                    }
                }
                if (!string.IsNullOrEmpty(WhereClause))
                {
                    objReq.WhereClause = WhereClause;
                }
                LostFoundData ret      = ws.GetLostFoundData(objReq);
                int           pageSize = ContextKeys.GRID_PAGE_SIZE;
                //gvItemTable.PageSize = pageSize;
                //gvItemTable.DataSource = ret.LostId;
                //gvItemTable.DataBind();
                gvItemTable1.PageSize   = pageSize;
                gvItemTable1.DataSource = ret.LostId;
                gvItemTable1.DataBind();
            }//try End
            catch (Exception ex)
            {
                logger.Info(ex.Message);
            }
        }//method end