Exemple #1
0
        public string CreateStatementByIntroducer(string InstallationID,
                                                  string soapusername, string soappassword,
                                                  string IntroducerID, string FacilityNo, string AccountNo, string StartDate, string EndDate)
        {
            try
            {
                DateTime startDate, endDate;

                if (StartDate == "" || EndDate == "")
                {
                    throw new Exception("Missing Date range");
                }

                OriginatorBiz oBiz = new OriginatorBiz(InstallationID, soapusername, soappassword, IntroducerID, FacilityNo, AccountNo);
                startDate = Convert.ToDateTime(StartDate);
                endDate   = Convert.ToDateTime(EndDate);

                GenerateStatementBiz generateStatement = new GenerateStatementBiz();
                Int64 AccountTemplateDocumentID        = generateStatement.GenerateStatement(
                    Convert.ToInt64(InstallationID), Convert.ToInt64(FacilityNo), Convert.ToInt64(AccountNo), 0, startDate, endDate);

                return("<accountdocumentid>" + LWTSafeTypes.SafeString(AccountTemplateDocumentID) + "</accountdocumentid>");

                //DataSet myDataSet = (new FacilityDAL()).GetStatementByIntroducer(
                //    oBiz.InstallationID, oBiz.LWIntroducerID, oBiz.AccountFacilityID.Value, oBiz.AccountID.Value, startDate, endDate);
                //return myDataSet.GetXml();
            }
            catch (Exception ex)
            {
                return("<error>" + ex.Message.ToString() + "</error>");
            }
        }
Exemple #2
0
        public string CreateStatementByCustomer(string InstallationID,
                                                string soapusername, string soappassword,
                                                string CustomerID, string FacilityNo, string AccountNo, string StartDate, string EndDate)
        {
            try
            {
                DateTime startDate, endDate;

                if (StartDate == "" || EndDate == "")
                {
                    throw new Exception("Missing Date range");
                }

                CustomerBiz oBiz = new CustomerBiz(InstallationID, soapusername, soappassword, CustomerID, FacilityNo, AccountNo);
                startDate = Convert.ToDateTime(StartDate);
                endDate   = Convert.ToDateTime(EndDate);

                GenerateStatementBiz generateStatement = new GenerateStatementBiz();
                Int64 AccountTemplateDocumentID        = generateStatement.GenerateStatement(
                    Convert.ToInt64(InstallationID), Convert.ToInt64(FacilityNo), Convert.ToInt64(AccountNo), 0, startDate, endDate);

                return("<accountdocumentid>" + LWTSafeTypes.SafeString(AccountTemplateDocumentID) + "</accountdocumentid>");
            }
            catch (Exception ex)
            {
                return("<error>" + ex.Message.ToString() + "</error>");
            }
        }
Exemple #3
0
        public byte[] DownloadStatamentFile(Int64 AccountDocumentTemplateID)
        {
            System.IO.FileStream fs1 = null;
            string fileName          = @"AttachmentFile\AccountStatement";
            string LocalDocPath      = Path.Combine(HostingEnvironment.ApplicationHost.GetPhysicalPath(), fileName);
            string destinationFile   = "";

            try
            {
                loanServ.DAL.AccountDocumentTemplate DAL = new loanServ.DAL.AccountDocumentTemplate();
                DAL.AccountTemplateDocumentID = AccountDocumentTemplateID;

                DataSet dataSet = DAL.GetAccountTemplateDocumentByKey();

                DataTable dataTable = (DataTable)dataSet.Tables[0];

                DataRow dataRow                   = dataTable.Rows[0];
                string  OriginalFilename          = LWTSafeTypes.SafeString(dataRow["OriginalFilename"].ToString());
                string  SystemFilename            = LWTSafeTypes.SafeString(dataRow["SystemFilename"].ToString());
                string  FullSystemFilenamePath    = LWTSafeTypes.SafeString(dataRow["FullSystemFilenamePath"].ToString());
                string  FullPDFSystemFilenamePath = LWTSafeTypes.SafeString(dataRow["FullPDFSystemFilenamePath"].ToString());
                string  ServerFileRootPath        = CommonMethod.GetGlobalSetting("BOTH", "PATH_FILE_ROOT");

                string sourceFile = FullPDFSystemFilenamePath;

                LWT.Common.Files.CreateDirectory(LocalDocPath);

                if (sourceFile == "")
                {
                    sourceFile = FullSystemFilenamePath;
                }

                sourceFile = Path.Combine(ServerFileRootPath, sourceFile);

                string destinationFileName = Path.GetFileName(sourceFile);
                destinationFile = Path.Combine(LocalDocPath, destinationFileName);

                //if (File.Exists(sourceFile))
                //    File.Copy(sourceFile, destinationFile, true);
                //fs1 = System.IO.File.Open(destinationFile, FileMode.Open, FileAccess.Read);
                fs1 = System.IO.File.Open(sourceFile, FileMode.Open, FileAccess.Read);
                byte[] b1 = new byte[fs1.Length];
                fs1.Read(b1, 0, (int)fs1.Length);
                fs1.Close();
                return(b1);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #4
0
 public override void Initialisation()
 {
     try
     {
         lblClubName.Text = LWTSafeTypes.SafeString(Request.QueryString["ClubName"]);
         ClubID           = LWTSafeTypes.SafeString(Request.QueryString["ClubID"]);
         ReleaseDate      = DateTime.Now;
         Sender           = LWTSafeTypes.SafeString(Request.QueryString["UserID"]);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #5
0
        public string GetErrorListSearch()
        {
            DataTable dataTable = null;

            try
            {
                cErrMsg = "";
                StoreDataToDataLayer();
                dataTable = error.GetErrorListSearch();
                if (dataTable.Rows.Count == 1)
                {
                    cErrCode = LWTSafeTypes.SafeString(dataTable.Rows[0]["cErrCode"].ToString());
                    cErrMsg  = LWTSafeTypes.SafeString(dataTable.Rows[0]["cErrMsg"].ToString());
                    cAction  = LWTSafeTypes.SafeString(dataTable.Rows[0]["cAction"].ToString());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(cErrMsg);
        }