示例#1
0
        public bool AddNewRegistration(FormViewParameter Parameter, DataTable PartyDetails, Guid Id, DataTable FeeDetails,DataTable DocDetails,Remarks rem)
        {
            IGRSS.DataAccessLayer.Registration.InputSheetRow row = (IGRSS.DataAccessLayer.Registration.InputSheetRow) Parameter.Values;
               Guid  ValuationFormId = Id;

            string curUser = Thread.CurrentPrincipal.Identity.Name;
            Guid RegistrationId = FileManager.OpenNewFile(row.OfficeId, "REG");
            FileManager.AddRemarkToFile(RegistrationId,rem.Subject,rem.Body);
            //ViewState["ValuationFormId"] = ValuationFormId;
            IgrssAdapters.InputSheet.AddNewInputSheet(RegistrationId, row.OfficeId, row.RegistrationTypeId,ValuationFormId, row.FilePrefix, row.FileSlNo, row.FileYear,
            row.ApplnDate, row.ApplicantName, row.ApplnAddress, row.PropertyValue, row.IsRented, row.LeasePeriodFrom, row.LeasePeriodTo,
            row.DepositAmount, row.Tax, row.YearlyRent, row.StampDutyUsed,  curUser, DateTime.Now);

            foreach (DataRow PartyDetail in PartyDetails.Rows)
            {
                IgrssAdapters.RegistrationPartyDetails.AddNewPartyDetails(Guid.NewGuid(), RegistrationId,

                (string) PartyDetail["PartyType"], (string) PartyDetail["Name"], (string) PartyDetail["Address"], (decimal) PartyDetail["Age"],
                (string) PartyDetail["Gender"], (Guid) PartyDetail["Religion"], (string) PartyDetail["Occupation"],
                (string) PartyDetail["Occupation"], curUser, DateTime.Now);

            }

            foreach (DataRow FeeDetail in FeeDetails.Rows)
            {
                IgrssAdapters.RegistrationFeeDetails.AddNewRegistrationFee(RegistrationId, (Guid) FeeDetail["FeeId"], Convert.ToDecimal(FeeDetail["Amount"]));
            }
            foreach (DataRow DocDetail in DocDetails.Rows)
            {

                IgrssAdapters.RegistrationDocumentCheckList.AddNewRegistrationDocuments(RegistrationId, (Guid) DocDetail["DocumentTypeId"], Convert.ToBoolean(DocDetail["Submitted"]), Convert.ToString(DocDetail["DocumentNumber"]), Convert.ToString(DocDetail["Remarks"]));
            }

             	return true;
        }
示例#2
0
        //string ComplaintNo, Guid ComplaintType, Guid AgainstEmpID, Guid ComplainingEmpID, string ComplainantName, string ComplainantAddress, DateTime ComplaintDate, Guid ReceivingOfficeId, string Subject, string Detail)
        /// <summary>
        /// This function will add the new Complain. 
        /// </summary>
        /// <returns>void</returns>
        public bool AddNewComplain(FormViewParameter Parameter, Remarks rem)
        {
            string curUser = Thread.CurrentPrincipal.Identity.Name;
            int i = 0;
            ComplainDetailsRow row = (ComplainDetailsRow)Parameter.Values;
            try
            {
                Guid ComplainId = FileManager.OpenNewFile(row.ReceivingOfficeId, "COM");
                // Commented By Akhilesh.
                //if (rem.Subject != "" && rem.Body != "")
                //{
                //    FileManager.AddRemarkToFile(ComplainId, rem.Subject, rem.Body);
                //}
                int rowsAffected=0;
                if(row.ComplaintType == new Guid("85aefd8d-6b7e-4ab8-b124-21b52073f7b3"))
                {
                    i=IgrssAdapters.ComplainAdapter.AddNewComplainDetails(ComplainId, row.ComplaintNo, row.ComplaintType, row.AgainstEmpID, row.ComplainingEmpID, row.ComplainantName, row.ComplainantAddress, row.ComplaintDate, row.ReceivingOfficeId, row.Subject, row.Detail, curUser, DateTime.Now,row.Designation,row.CurrentOffice);
                }
                if (row.ComplaintType == new Guid("96369687-0450-42fc-ba41-ad35ade13b53"))
                {
                     i=IgrssAdapters.ComplainAdapter.AddNewComplainDetails(ComplainId, row.ComplaintNo, row.ComplaintType, row.AgainstEmpID, row.ComplainingEmpID, row.ComplainantName, row.ComplainantAddress, row.ComplaintDate, null, row.Subject, row.Detail, curUser, DateTime.Now, row.Designation, null);
                }
                if (i > 0)
                {
                    Dictionary<string, object> WfParams = new Dictionary<string, object>();
                    WfParams.Add("ComplainId", ComplainId);
                    WfParams.Add("ComplainOffice", row.ReceivingOfficeId);

                    WorkflowResults WfResult = WorkflowMediator.RunWorkflow(typeof(ComplainProcess), WfParams);

                    return true;
                }
                else
                {

                    return false;
                }
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                    throw;
                return false;
            }
        }
示例#3
0
        public bool AddAppealAplication(FormViewParameter parameter, DataTable dtAct,Remarks rem)
        {
            //Initiate some of the fields required for the process
            AppealApplicationRow rowApl = (AppealApplicationRow)parameter.Values;
            Guid AppealId = FileManager.OpenNewFile(rowApl.OfficeId, "APL");
            FileManager.AddRemarkToFile(AppealId, rem.Subject, rem.Body);
            string curUser = Thread.CurrentPrincipal.Identity.Name;
            int i = 0;
            try
            {

                IGRSS.DataAccessLayer.Appeal.AppealApplicationRow row = (AppealApplicationRow) parameter.Values;
                i=IgrssAdapters.AppealAdapter.AddAppealApplication(AppealId, row.OfficeId, row.RegistrationNo, row.ApplicantName, row.Address, row.TypeOfAppeal, row.CalculatedAmount, row.DepositAmount, row.FeeReceiptNo, row.Amount, row.InwardDate, row.IsPaidAppealFee, row.AppealInTime, row.PaperFromTo, row.CourtFeeTicket, curUser, DateTime.Now, row.DocumentNo, row.OriginalSRO, row.DocumentDate, row.DaTeOffOrderFromCollector, row.DficitAmount,row.ReceiptNo,row.ReceiptDate);
                if (i > 0)
                {
                    foreach (DataRow dr in dtAct.Rows)
                    {
                        IgrssAdapters.AppealActAdapter.AddAppealAct(AppealId, (Guid)dr["ActId"], (bool)dr["Checked"]);
                    }

                    // All database Inserts have been completed sucessfully initiate the Workflow
                    // Create a Dioctionary to store Workflow Paramaters for Appeal
                    Dictionary<string, object> WfParams = new Dictionary<string, object>();
                    // Add Refund Application  Id into the Workflow Parameter
                    WfParams.Add("AppealId", AppealId);
                    // Add Office Id in to Workflow Parameter
                    // (to identify the process flow for the Office)
                    WfParams.Add("InitiatingOffice", row.OfficeId);

                    // Initiate the Refund Workflow by passing the Wf Parameters Dictionary
                    WorkflowResults WfResult = WorkflowMediator.RunWorkflow(typeof(AppealProcess), WfParams);
                    return true;
                }
                else
                {
                    return false;
                }
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                    throw;
                return false;
            }
        }
示例#4
0
 //string ComplaintNo, Guid ComplaintType, Guid AgainstEmpID, Guid ComplainingEmpID, string ComplainantName, string ComplainantAddress, DateTime ComplaintDate, Guid ReceivingOfficeId, string Subject, string Detail)
 /// <summary>
 /// This function will add the new Complain. 
 /// </summary>
 /// <returns>void</returns>
 public bool AddNewConfidentialreport(FormViewParameter Parameter, Remarks rem)
 {
     string curUser = Thread.CurrentPrincipal.Identity.Name;
     int i = 0;
     ComplainDetailsRow row = (ComplainDetailsRow)Parameter.Values;
     try
     {
         Guid ComplainId = FileManager.OpenNewFile(row.ReceivingOfficeId, "COM");
         int rowsAffected=0;
         if(row.ComplaintType == new Guid("85aefd8d-6b7e-4ab8-b124-21b52073f7b3"))
         {
             i=IgrssAdapters.ComplainAdapter.AddNewComplainDetails(ComplainId, row.ComplaintNo, row.ComplaintType, row.AgainstEmpID, row.ComplainingEmpID, row.ComplainantName, row.ComplainantAddress, row.ComplaintDate, row.ReceivingOfficeId, row.Subject, row.Detail, curUser, DateTime.Now,row.Designation,row.CurrentOffice);
         }
         if (row.ComplaintType == new Guid("96369687-0450-42fc-ba41-ad35ade13b53"))
         {
              i=IgrssAdapters.ComplainAdapter.AddNewComplainDetails(ComplainId, row.ComplaintNo, row.ComplaintType, row.AgainstEmpID, row.ComplainingEmpID, row.ComplainantName, row.ComplainantAddress, row.ComplaintDate, null, row.Subject, row.Detail, curUser, DateTime.Now, row.Designation, null);
         }
         return true;
     }
     catch (Exception ex)
     {
         if (ExceptionPolicy.HandleException(ex, "DAL"))
             throw;
         return false;
     }
 }
示例#5
0
        /// <summary>
        /// Inserting the new RefundApplication
        /// </summary>
        /// <param name="Parameter"> formview parameter</param>
        /// <param name="StampDetails">stamps added by the user in the form of Datatable </param>
        /// <param name="ActsApplicable">Acts added by the user</param>
        /// <returns>true, a record is inserted</returns>
        public bool AddNewRefundApplication(FormViewParameter Parameter, DataTable StampDetails, DataTable ActsApplicable, Remarks rem)
        {
            // Initiate some of the fields required for the process
            RefundApplicationRow rowRef = (RefundApplicationRow)Parameter.Values;
            Guid RefundApplicationId = FileManager.OpenNewFile(rowRef.OfficeId, "REF");
            FileManager.AddRemarkToFile(RefundApplicationId, rem.Subject, rem.Body);
            string curUser = Thread.CurrentPrincipal.Identity.Name;
            RefundApplicationRow row = (IGRSS.DataAccessLayer.Refund.RefundApplicationRow) Parameter.Values;
            try
            {

                TimeSpan ts = new TimeSpan(row.PurchasedDate.Ticks - row.ApplicationDate.Ticks);
                string DayDifference = ts.TotalDays.ToString();

                // Insert the Refiund Application data to database
                    decimal TotalValueOfStamps = Convert.ToDecimal(row.TotalValueOfStamps);
                    decimal pActualStampValue = 10 * TotalValueOfStamps / 100;
                    decimal ActualStampValue = TotalValueOfStamps - pActualStampValue;
                    IgrssAdapters.RefundApplicationAdapter.NewRefundApplication(RefundApplicationId, row.OfficeId,
                    row.RegistrationNo, row.TypeOfRefund, row.ApplicationDate,
                    row.VendorLicenseId, row.PurchasedDate, row.TotalValueOfStamps, row.ReasonForNotUsing, row.ApplicantName,
                    row.ApplicantAddress, row.City, row.District, row.PinCode, row.PhoneNo.ToString(), DateTime.Now, curUser, ActualStampValue);

                // For each Stamp Detail entered by user
                // Insert the Stamp Details for this Refund in to child table
                foreach (DataRow StampDetail in StampDetails.Rows)
                {
                    IgrssAdapters.RefundStampDetailsAdapter.InsertStampDetails(RefundApplicationId, (Guid) StampDetail["RevenueStampId"],
                        (string) StampDetail["ReturnedQty"], (string) StampDetail["StampNumber"]);
                }
                // For each Act selected by the user
                // Insert the Applicable Acts to child table
                foreach (DataRow Act in ActsApplicable.Rows)
                {
                    IgrssAdapters.RefundActsApplicable.InsertRefundActsApplicable(RefundApplicationId, (Guid) Act["ActId"], (bool) Act["Checked"], "");
                }

                // All database Inserts have been completed sucessfully initiate the Workflow
                // Create a Dioctionary to store Workflow Paramaters for Refund
                Dictionary<string, object> WfParams = new Dictionary<string, object>();
                // Add Refund Application  Id into the Workflow Parameter
                WfParams.Add("RefundId", RefundApplicationId);
                // Add Office Id in to Workflow Parameter
                // (to identify the process flow for the Office)
                WfParams.Add("InitiatingOffice", row.OfficeId);

                // Initiate the Refund Workflow by passing the Wf Parameters Dictionary
                WorkflowResults WfResult = WorkflowMediator.RunWorkflow(typeof(RefundProcess), WfParams);
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                    throw;
            }
            return true;
        }
示例#6
0
        /// <summary>
        /// This function will update the vendor record
        /// </summary>
        /// <param name="Parameter">Contains all the fields of the formview</param>
        /// <returns>boolean</returns>
        public bool updateVendorsDetail(FormViewParameter Parameter, bool Verified, Guid AlertId, Guid LicenseApplicationId, Remarks rem)
        {
            string curUser = Thread.CurrentPrincipal.Identity.Name;
            try
            {
                if ((rem.Body != "") || (rem.Subject != ""))
                {
                    FileManager.AddRemarkToFile(LicenseApplicationId, rem.Subject, rem.Body);
                }
                //IgrssAdapters.LAppTableAdapter.UpdateVendorDetails(row.ApplnNumber, row.NameOfApplicant, row.PresentAddress, row.PermanentAddress, row.DateOfBirth, DateTime.Now, row.Qualification, row.Experience, row.Caste, row.BusinessAddress, row.TotalInvestmentAmount, row.NameAndAddressOfReferer, row.SubmissionOfficeId, row.HomePhone, row.Remarks,LicenseApplicationId);
                Guid InstanceId = (Guid)IgrssAdapters.LAppTableAdapter.GetWfIdByLicenseApplicationId(LicenseApplicationId);
                if (Verified)
                {
                    FeedbackEventArgs args = new FeedbackEventArgs(InstanceId, AlertId, curUser);
                    WorkflowMediator.LicenseApplicationServices.ValidateLicenseApplication(InstanceId, args);
                }
                else
                {
                    ApplicationUpdatedEventArgs args = new ApplicationUpdatedEventArgs(InstanceId, (LicenseApplicationRow)Parameter.Values);
                    WorkflowMediator.LicenseApplicationServices.UpdateApplication(InstanceId, args);
                }

                //Guid InstanceId = (Guid) IgrssAdapters.ComplainAdapter.GetWfIdByComplainId(ComplainId);
                //InvestigationRequiredEventArgs args = new InvestigationRequiredEventArgs(InstanceId);
                //args.InvestigatingOfficer = InvestigatingOfficer;
                //WorkflowMediator.ComplainServices.RequireInvestigation(InstanceId, args);
                return true;

            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                    throw;
                return false;
            }
        }
示例#7
0
        public bool NewLicenseApplication(FormViewParameter Parameter, Remarks rem)
        {
            LicenseAppRow rowLic = (LicenseAppRow)Parameter.Values;
            try
            {
                Guid LicenseId = FileManager.OpenNewFile(rowLic.SubmissionOfficeId, "LIC");
                if ((rem.Body != "") || (rem.Subject != ""))
                {
                    FileManager.AddRemarkToFile(LicenseId, rem.Subject, rem.Body);
                }

                string UserName = Thread.CurrentPrincipal.Identity.Name;
                IGRSS.DataAccessLayer.LicenseApplication.LicenseApplicationRow row = (IGRSS.DataAccessLayer.LicenseApplication.LicenseApplicationRow)Parameter.Values;
                int i = IgrssAdapters.LAppTableAdapter.AddNewLicenseAplication(LicenseId, row.NameOfApplicant, row.PresentAddress, row.PermanentAddress, row.DateOfBirth, DateTime.Now, row.Qualification, row.Experience, row.Caste, row.BusinessAddress, row.TotalInvestmentAmount, row.NameAndAddressOfReferer, row.SubmissionOfficeId, row.ApplnNumber, row.HomePhone, row.HoldingAnyOtherLicense, row.PurposeOfLicense);
                if (i == 1)
                {
                    Dictionary<string, object> WfParams = new Dictionary<string, object>();
                    WfParams.Add("LicenseId", LicenseId);
                    WfParams.Add("InitiatingOffice", row.SubmissionOfficeId);
                    WfParams.Add("IsRenew", false);

                    WorkflowResults WfResult = WorkflowMediator.RunWorkflow(typeof(LicenseIssueProcess), WfParams);
                    return true;
                }
                else
                    return false;

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