Пример #1
0
 public bool DisplayPPRDetails()
 {
     try
     {
         PPRDataBL obj = new PPRDataBL();
         DataTable dt  = new DataTable();
         dt = obj.GetPPRDetailsDataBL(Session["UserId"].ToString());
         if (dt.Rows.Count > 0)
         {
             PPRDetailsGridView.DataSource = dt;
             PPRDetailsGridView.DataBind();
             if (Session["Rolls"] != null)
             {
                 if (Session["Rolls"].ToString() == "3")
                 {
                     PPRDetailsGridView.Columns[PPRDetailsGridView.Columns.Count - 1].Visible = false;
                 }
             }
         }
         else
         {
             PPRDetailsGridView.DataSource = null;
             PPRDetailsGridView.DataBind();
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
     return(false);
 }
Пример #2
0
    public void FilterMinistry(string ministry = "----All Ministry----", string pprid = "")
    {
        string Query = string.Empty;


        //pprid= pprid!=""? " and PPRId  like  '%" + pprid + "%'":"" ;

        //if (!string.IsNullOrEmpty(ministry))
        //{

        DataTable dt       = (DataTable)ViewState["DataList"];
        DataView  dataView = dt.DefaultView;

        if (ministry != "-----Select Ministry-----" && ministry != "" && pprid != "")
        {
            Query += "Minid  =  '" + ministry + "'";
            pprid  = pprid != "" ? " and PPRId  like  '%" + pprid + "%'" : "";
            dataView.RowFilter = Query + pprid;
        }
        else if (ministry != "-----Select Ministry-----" && ministry != "")
        {
            dataView.RowFilter = "Minid  =  '" + ministry + "'";
        }
        else if (pprid != "")
        {
            pprid = pprid != "" ? "  PPRId  like  '%" + pprid + "%'" : "";
            dataView.RowFilter = pprid;
        }
        PPRDetailsGridView.DataSource = dataView;
        PPRDetailsGridView.DataBind();
        //}
    }
Пример #3
0
 private void SearchMinistry()
 {
     try
     {
         if (ddlpprid.SelectedItem.Value == "")
         {
             lblmsg.Text = "Please Select PPR Id";
             PPRDetailsGridView.Visible = false;
         }
         else
         {
             PPRDataBL obj = new PPRDataBL();
             DataTable dt  = new DataTable();
             dt = obj.GetSearchMinistryBL(HttpUtility.HtmlEncode(ddlpprid.SelectedItem.Value));
             if (dt.Rows.Count > 0)
             {
                 PPRDetailsGridView.DataSource = dt;
                 PPRDetailsGridView.DataBind();
                 PPRDetailsGridView.Visible = true;
                 lblmsg.Text = "";
             }
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
 }
Пример #4
0
    public bool DisplayMisReportData()
    {
        try
        {
            string[] pprids = txtPprId.Text.Split('-');

            PPRDataBL obj = new PPRDataBL();
            DataTable dt  = new DataTable();
            dt = obj.GetPPRDetailsDeleteBL(Session["LoginId"].ToString());
            ViewState["DataList"] = dt;

            PPRDetailsGridView.DataSource = dt;
            PPRDetailsGridView.DataBind();
        }
        catch (Exception ex)
        {
            LogError(ex);
        }
        return(false);
    }
Пример #5
0
 public bool DisplayPPRDetails()
 {
     try
     {
         PPRDataBL obj = new PPRDataBL();
         DataTable dt  = new DataTable();
         dt = obj.GetPPRDetailsDeleteBL(Session["LoginId"].ToString());
         if (dt.Rows.Count > 0)
         {
             PPRDetailsGridView.DataSource = dt;
             PPRDetailsGridView.DataBind();
         }
         else
         {
             PPRDetailsGridView.DataSource = null;
             PPRDetailsGridView.DataBind();
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
     return(false);
 }