protected void GrdAidMemoire_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        try
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                SqlConnection con    = DataAccess.GetConnctionEapDea();
                string        AidMId = GrdAidMemoire.DataKeys[e.Row.RowIndex].Value.ToString();
                GridView      GridGrdAidMemoireChildData = e.Row.FindControl("GrdAidMemoireChildData") as GridView;

                obj = new AcknowledgementBL();
                DataTable dt = obj.GetAidMemoireBL(Session["UserId"].ToString(), "AidMemoireChildData", AidMId);
                if (dt.Rows.Count > 0)
                {
                    GridGrdAidMemoireChildData.DataSource = dt;
                    GridGrdAidMemoireChildData.DataBind();
                }
                else
                {
                    GridGrdAidMemoireChildData.DataSource = dt;
                    GridGrdAidMemoireChildData.DataBind();
                }
            }
        }
        catch (Exception ex)
        {
            LogError(ex);
        }
    }
Exemple #2
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         string FileName   = string.Empty;
         string folderPath = Server.MapPath("~/writedata/Feedback/");
         obj = new AcknowledgementBL();
         MailUtility objm = new MailUtility();
         if (FileUpload.HasFile == true)
         {
             if (ValidatePDF(FileUpload))
             {
                 FileName = "User_FeedbackDetails_" + HttpUtility.HtmlEncode(txtAuthority.Text) + "_" + CommonUtility.GetDate(DateTime.Now);
             }
             else
             {
                 return;
             }
         }
         int success = obj.SendFeedbackBL("UserComplain", Session["UserId"].ToString(), HttpUtility.HtmlEncode(txtRemarks.Text), FileName);
         if (success > 0)
         {
             if (FileUpload.HasFile == true)
             {
                 FileUpload.PostedFile.SaveAs(folderPath + "\\" + FileName + ".pdf");
             }
             objm.SendFeedbackEmail(txtAuthority.Text, txtRemarks.Text, "*****@*****.**", folderPath + "\\" + FileName + ".pdf");
             ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Complain Save Successfully you will get Feedback with in day');window.location ='Feedback.aspx';", true);
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
 }
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         string AidMemID   = string.Empty;
         string SentTo     = string.Empty;
         string message    = string.Empty;
         string FileName   = string.Empty;
         string folderPath = Server.MapPath("~/writedata/MemoireDocument/");
         obj = new AcknowledgementBL();
         MailUtility objm = new MailUtility();
         if (grdMCList.Rows.Count > 0)
         {
             if (FileUpload.HasFile == true)
             {
                 if (ValidatePDF(FileUpload))
                 {
                     FileName = "MemoireDocument_" + HttpUtility.HtmlEncode(ddlPprId.SelectedValue).ToString() + "_" + CommonUtility.GetDate(DateTime.Now);
                     string success = obj.SendMemoireDataBL(ddlPprId.SelectedValue, txtRemarks.Text, FileName, Session["UserId"].ToString());
                     AidMemID = success.ToString();
                     if (Int32.Parse(success) > 0)
                     {
                         for (int i = 0; i < grdMCList.Rows.Count; i++)
                         {
                             int Complete = obj.SendMappedMemoireDataBL(AidMemID, (grdMCList.Rows[i].FindControl("lnkMCReqDoc") as LinkButton).CommandArgument.ToString());
                         }
                         if (FileUpload.HasFile == true)
                         {
                             FileUpload.PostedFile.SaveAs(folderPath + "\\" + FileName + ".pdf");
                         }
                         DataTable dt = obj.GetAcknowledgementPosingEmailBL(ddlPprId.SelectedValue, "AcknowledgementEmail");
                         if (dt.Rows.Count > 0)
                         {
                             for (int i = 0; i < dt.Rows.Count; i++)
                             {
                                 SentTo = SentTo + dt.Rows[0]["N_Email"].ToString() + ";";
                             }
                         }
                         objm.SendAddMemoireDetailsEmail(SentTo, ddlPprId.SelectedItem.Text, txtRemarks.Text, folderPath + FileName + ".pdf");
                         ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Details Save Successfully');window.location ='AddMemoire.aspx';", true);
                         this.ClearFormData();
                     }
                 }
                 else
                 {
                     return;
                 }
             }
         }
         else
         {
             Alert.show("Please Select atleast one Mission Clearance");
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
 }
 public void GetAidMemoireDetails()
 {
     try
     {
         obj = new AcknowledgementBL();
         DataTable dt = obj.GetAidMemoireBL(Session["UserId"].ToString(), "AidMemoireParentData", "");
         if (dt.Rows.Count > 0)
         {
             GrdAidMemoire.DataSource = dt;
             GrdAidMemoire.DataBind();
         }
         else
         {
             GrdAidMemoire.DataSource = dt;
             GrdAidMemoire.DataBind();
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
 }
Exemple #5
0
 public void GetAcknowledgementPosingAction()
 {
     try
     {
         obj = new AcknowledgementBL();
         DataTable dt = obj.GetAcknowledgementPosingActionBL(Session["UserId"].ToString());
         if (dt.Rows.Count > 0)
         {
             GrdAcknowledgement.DataSource = dt;
             GrdAcknowledgement.DataBind();
         }
         else
         {
             GrdAcknowledgement.DataSource = dt;
             GrdAcknowledgement.DataBind();
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
 }
Exemple #6
0
 public void GetFeedbackDetails()
 {
     try
     {
         obj = new AcknowledgementBL();
         DataTable dt = obj.GetFeedbacDetailskBL("GetFeedbackDetails", Session["UserId"].ToString());
         if (dt.Rows.Count > 0)
         {
             GrdFeedback.DataSource = dt;
             GrdFeedback.DataBind();
         }
         else
         {
             GrdFeedback.DataSource = dt;
             GrdFeedback.DataBind();
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
 }
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         string FileName   = string.Empty;
         string folderPath = Server.MapPath("~/writedata/AcknowledgementPosing/");
         obj = new AcknowledgementBL();
         if (FileUpload.HasFile == true)
         {
             if (ValidatePDF(FileUpload))
             {
                 FileName = "AcknowledgementPosing_" + HttpUtility.HtmlEncode(ddlPprId.SelectedValue).ToString() + "_" + CommonUtility.GetDate(DateTime.Now);
             }
             else
             {
                 return;
             }
         }
         int success = obj.SendPosingActionBL(ddlPprId.SelectedValue, ddlAction.SelectedValue, FileName, HttpUtility.HtmlEncode(txtRemarks.Text), Session["UserId"].ToString());
         if (success > 0)
         {
             if (FileUpload.HasFile == true)
             {
                 FileUpload.PostedFile.SaveAs(folderPath + "\\" + FileName + ".pdf");
             }
             ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Details Save Successfully');window.location ='Acknowledgement.aspx';", true);
             this.ClearFormData();
         }
         else
         {
             Alert.show("MDB Not Mapped Successfully !");
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
 }
 public void GetUserLogin()
 {
     try
     {
         obj = new AcknowledgementBL();
         DataTable dt = obj.GetUserLoginDetailsBL();
         if (dt.Rows.Count > 0)
         {
             GrdUserLogin.DataSource = dt;
             GrdUserLogin.DataBind();
             ViewState["DataList"] = dt;
         }
         else
         {
             GrdUserLogin.DataSource = dt;
             GrdUserLogin.DataBind();
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
 }
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         string FileName   = string.Empty;
         string folderPath = Server.MapPath("~/writedata/FeedbackReply/");
         obj = new AcknowledgementBL();
         MailUtility objm = new MailUtility();
         if (FileUpload.HasFile == true)
         {
             if (ValidatePDF(FileUpload))
             {
                 FileName = "User_FeedbackReply_" + HttpUtility.HtmlEncode(txtComplainId.Text) + "_" + CommonUtility.GetDate(DateTime.Now);
             }
             else
             {
                 return;
             }
         }
         int success = obj.SendFeedbackBL("UserComplainReply", ViewState["ComplainId"].ToString(), HttpUtility.HtmlEncode(txtReply.Text), FileName);
         if (success > 0)
         {
             if (FileUpload.HasFile == true)
             {
                 FileUpload.PostedFile.SaveAs(folderPath + "\\" + FileName + ".pdf");
             }
             objm.SendFeedbackReplyEmail(txtUserName.Text, HttpUtility.HtmlDecode(txtReply.Text), ViewState["UserEmail"].ToString(), folderPath + "\\" + FileName + ".pdf");
             ViewState["ComplainId"] = null;
             ViewState["UserEmail"]  = null;
             ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Reply Successfully send to user');window.location ='FeedbackReply.aspx';", true);
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
 }