示例#1
0
 protected void fvVendorDetails_ItemCommand(object sender, FormViewCommandEventArgs e)
 {
     if (e.CommandName == "ApproveVendorLicense")
     {
         Guid   licID         = new Guid(fldApplicationId.Value);
         string LicenseNo     = ((TextBox)fvVendorDetails.FindControl("txtLicNo")).Text;
         string IssueDate     = ((TextBox)fvVendorDetails.FindControl("txtIssueDate")).Text;
         string EffectiveDate = ((TextBox)fvVendorDetails.FindControl("txtEffectiveDate")).Text;
         string ExpiryDate    = ((TextBox)fvVendorDetails.FindControl("txtExpiryDate")).Text;
         Guid   AlertId       = (Guid)ViewState["AlertId"];
         objLicApproved.ApprovedVendorLicense(licID, LicenseNo, Convert.ToDateTime(IssueDate), Convert.ToDateTime(EffectiveDate), Convert.ToDateTime(ExpiryDate), AlertId);
         mvLicApprove.SetActiveView(mvLicApprove.Views[0]);
         txtApplicationNo.Text = "";
         Dictionary <string, string> reportParams = new Dictionary <string, string>();
         string ApplnNo = ((TextBox)fvVendorDetails.FindControl("ApplnNumberTextBox")).Text;
         reportParams.Add("ApplnNumber", ApplnNo);
         Session["ReportParams"] = reportParams;
         Session["ReportName"]   = "LicenseApplicationAcknowledgement";
         Response.Redirect("~/Report/Report.aspx");
     }
     if (e.CommandName == "RejectVendorLicense")
     {
         //Guid licID = new Guid(grdVen_Dtl.SelectedDataKey.Value.ToString());
         Guid licID = new Guid(fldApplicationId.Value);
         objLicApproved.RejectVenorLicense(licID);
         mvLicApprove.SetActiveView(mvLicApprove.Views[0]);
         txtApplicationNo.Text = "";
         WorkflowSupport.DeleteAlert(new Guid(ViewState["AlertId"].ToString()));
         ((IGRSS_Default)this.Master).ShowStatusMessage("Application Rejected", "The Application has been rejeced", MessageType.Success);
     }
 }
    protected void fvAppeal_ItemCommand(object sender, FormViewCommandEventArgs e)
    {
        //Checking the Command Name and Calling the Method of the BLL.
        if (e.CommandName == "ApproveAppealApplication")
        {
            //Getting the selected DataKey of the GridView into Variable.
            Guid AppealId = new Guid(fldAppealApplicationId.Value.ToString());
            //Calling the Method of the BLL.
            objAppeal.ApproveAppealApplication(AppealId, (Guid)ViewState["AlertId"]);
            ((IGRSS_Default)this.Master).ShowStatusMessage(Status_Messages.SaveSucess, Status_Messages.SaveSucessDescription, MessageType.Success);

            //((IGRSS_Default)this.Master).ShowStatusMessage("Application Approved", "The Application has been Approved", MessageType.Success);

            Response.Redirect("~/Default.aspx");
        }
        if (e.CommandName == "RejectAppealApplication")
        {
            //Getting the selected DataKey of the GridView.
            Guid licID = new Guid(fldAppealApplicationId.Value.ToString());
            //Calling the Method of the BLL.
            objAppeal.RejectAppealApplication(licID);
            WorkflowSupport.DeleteAlert(new Guid(ViewState["AlertId"].ToString()));
            ((IGRSS_Default)this.Master).ShowStatusMessage("Application Rejected", "The Application has been rejeced", MessageType.Success);
            Response.Redirect("~/Default.aspx");
        }
    }
示例#3
0
        public static bool ReturnFile(Guid FileId)
        {
            string curUser = Thread.CurrentPrincipal.Identity.Name;
            string message = "File has been returned to you";

            int fileForwardLevel = Convert.ToInt32(IgrssAdapters.FileForwardingAdapter.GetFileForwardLevel(FileId));

            try
            {
                FileForwardTable ForwardDetail = IgrssAdapters.FileForwardingAdapter.GetFileForwardDetailsByLevel(FileId, fileForwardLevel);
                if (ForwardDetail.Rows.Count > 0)
                {
                    FileForwardsRow row   = ForwardDetail[0];
                    IgrssAlert      Alert = WorkflowSupport.GetAlertById(row.FordwardedAlertId);
                    if (fileForwardLevel > 1)
                    {
                        Guid GroupId = Guid.NewGuid();
                        WorkflowSupport.SendAlert(curUser, Alert.SentBy, Alert.Link, message, Alert.SessionData, GroupId);
                    }
                    else if (fileForwardLevel == 1)
                    {
                        WorkflowSupport.EnableAlert(Alert.AlertId);
                    }
                    WorkflowSupport.DeleteAlert(Alert.AlertId);
                    IgrssAdapters.FileForwardingAdapter.SetFileReturned(FileId, fileForwardLevel);
                }
                return(true);
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                {
                    throw;
                }
            }
            return(false);
        }