示例#1
0
 public void UpdateAppealApplication(Guid InstanceId, AppealApplicationUpdatedEventArgs args)
 {
     if (null != AppealApplicationUpdated)
     {
         AppealApplicationUpdated(null, args);
     }
 }
示例#2
0
        public bool UpdateAppealAplication(FormViewParameter parameter, DataTable dtAct, Guid AppealApplicationId, Guid AlertId, bool Verified)
        {
            string curUser = Thread.CurrentPrincipal.Identity.Name;
            try
            {
                IGRSS.DataAccessLayer.Appeal.AppealApplicationRow row = (IGRSS.DataAccessLayer.Appeal.AppealApplicationRow)parameter.Values;
                IgrssAdapters.AppealAdapter.UpdateAppealApplication(AppealApplicationId, row.RegistrationNo, row.ApplicantName, row.Address, row.CalculatedAmount, row.DepositAmount, row.FeeReceiptNo, row.Amount, row.InwardDate, row.IsPaidAppealFee, row.AppealInTime, row.PaperFromTo, row.OfficeId, row.CourtFeeTicket, row.TypeOfAppeal, curUser, DateTime.Now, row.DocumentNo, row.OriginalSRO, row.DocumentDate, row.DaTeOffOrderFromCollector, row.DficitAmount, row.ReceiptNo, row.ReceiptDate);
                IgrssAdapters.AppealActAdapter.DeleteAppealActsByAppealApplicationId(AppealApplicationId);
                foreach (DataRow dr in dtAct.Rows)
                {
                    IgrssAdapters.AppealActAdapter.AddAppealAct(AppealApplicationId, (Guid)dr["ActId"], (bool)dr["Checked"]);
                }

                // Get the Workflow Instance Id from table
                Guid WfInstanceId = (Guid)IgrssAdapters.AppealAdapter.GetWorkflowInstanceById(AppealApplicationId);

                // Check if the user has verified the application or just updated
                if (Verified)
                {
                    // Create the FeedbackEventArgs object
                    FeedbackEventArgs args = new FeedbackEventArgs(WfInstanceId, AlertId, curUser);
                    WorkflowMediator.AppealServices.ValidateAppealApplication(WfInstanceId, args);
                }
                else
                {
                    // The record has not been verified just updated
                    AppealApplicationUpdatedEventArgs args = new AppealApplicationUpdatedEventArgs(WfInstanceId, (AppealApplicationRow) parameter.Values, dtAct);
                    WorkflowMediator.AppealServices.UpdateAppealApplication(WfInstanceId, args);
                }
                return true;

            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                    throw;
                return false;

            }
        }