Beispiel #1
0
 public bool BindPendingTask()
 {
     try
     {
         PPRDataBL obj = new PPRDataBL();
         DataTable dt  = new DataTable();
         if (Session["UserId"] != null)
         {
             dt = obj.BindPpprApprovalRequestBL(Session["UserId"].ToString());
         }
         if (dt.Rows.Count > 0)
         {
             grdNotification.DataSource = dt;
             grdNotification.DataBind();
         }
         else
         {
             //PprNoti.Visible = false;
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
     return(false);
 }
 public bool BindPpprApprovalRequest()
 {
     try
     {
         PPRDataBL obj = new PPRDataBL();
         DataTable dt  = new DataTable();
         dt = obj.BindPpprApprovalRequestBL(Session["LoginId"].ToString());
         if (dt.Rows.Count > 0)
         {
             StringBuilder s = new StringBuilder();
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 if (dt.Rows[i]["pprstatus"].ToString().Equals("S"))
                 {
                     s.Append("<a href='PprApprovalRequest.aspx'>");
                     s.Append("<div class='task-info clearfix'>");
                     s.Append("<div class='desc pull-left'>");
                     s.Append("<p style='width: 120%;color: #8D5C7B;'>" + "PPR ID :- " + dt.Rows[i]["PPRId"].ToString() + "-" + dt.Rows[i]["ProjectName"].ToString() + " is requested for your Approval" + "</p>");
                     s.Append("</div>");
                     s.Append("</div>");
                     s.Append("</a>");
                 }
                 else if (dt.Rows[i]["pprstatus"].ToString().Equals("Y"))
                 {
                     s.Append("<a href='PprApprovalRequest.aspx'>");
                     s.Append("<div class='task-info clearfix'>");
                     s.Append("<div class='desc pull-left'>");
                     s.Append("<p style='width: 120%;color: green;'>" + "PPR ID :- " + dt.Rows[i]["PPRId"].ToString() + "-" + dt.Rows[i]["ProjectName"].ToString() + " is successfully approved by Nodal Officer" + "</p>");
                     s.Append("</div>");
                     s.Append("</div>");
                     s.Append("</a>");
                 }
                 else if (dt.Rows[i]["pprstatus"].ToString().Equals("N"))
                 {
                     s.Append("<a href='#'>");
                     s.Append("<div class='task-info clearfix'>");
                     s.Append("<div class='desc pull-left'>");
                     s.Append("<p style='width: 120%;color: red;'>" + "PPR ID :- " + dt.Rows[i]["PPRId"].ToString() + "-" + dt.Rows[i]["ProjectName"].ToString() + " is Reject by Nodal Officer" + "</p>");
                     s.Append("</div>");
                     s.Append("</div>");
                     s.Append("</a>");
                 }
                 else if (dt.Rows[i]["pprstatus"].ToString().Equals("P"))
                 {
                     s.Append("<a href='#'>");
                     s.Append("<div class='task-info clearfix'>");
                     s.Append("<div class='desc pull-left'>");
                     s.Append("<p style='width: 120%;color: green;'>" + "Your " + "PPR ID :- " + dt.Rows[i]["PPRId"].ToString() + "-" + dt.Rows[i]["ProjectName"].ToString() + " is Marked by Nodal Officer to Ministry for comments" + "</p>");
                     s.Append("</div>");
                     s.Append("</div>");
                     s.Append("</a>");
                 }
                 else if (dt.Rows[i]["pprstatus"].ToString().Equals("F"))
                 {
                     s.Append("<a href='QMS.aspx'>");
                     s.Append("<div class='task-info clearfix'>");
                     s.Append("<div class='desc pull-left'>");
                     s.Append("<p style='width: 120%;color: #8D5C7B;'>" + " Ministry has been commented against " + "PPR ID :- " + dt.Rows[i]["PPRId"].ToString() + "-" + dt.Rows[i]["ProjectName"].ToString() + "</p>");
                     s.Append("</div>");
                     s.Append("</div>");
                     s.Append("</a>");
                 }
                 else if (dt.Rows[i]["pprstatus"].ToString().Equals("V"))
                 {
                     s.Append("<a href='QMS.aspx'>");
                     s.Append("<div class='task-info clearfix'>");
                     s.Append("<div class='desc pull-left'>");
                     s.Append("<p style='width: 120%;color: #8D5C7B;'>" + " Ministry has been Send " + "PPR ID :- " + dt.Rows[i]["PPRId"].ToString() + "-" + dt.Rows[i]["ProjectName"].ToString() + " for Meeting Notice" + "</p>");
                     s.Append("</div>");
                     s.Append("</div>");
                     s.Append("</a>");
                 }
             }
             lblPPRApprovalRequest.Text = s.ToString();
         }
         else
         {
             //PprNoti.Visible = false;
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
     return(false);
 }