Пример #1
0
        public static A2ZCSPARAMETERDTO GetParameterValue()
        {
            A2ZCSPARAMETERDTO p = new A2ZCSPARAMETERDTO();


            //DataTable dt = BLL.CommonManager.Instance.GetDataTableBySpWithParams("Sp_CSGetInfoParameter", "A2ZCSMCUS");

            DataTable dt = CommonManager.Instance.GetDataTableByQuery("SELECT * FROM A2ZCSPARAMETER", "A2ZCSMCUS");

            p.FinancialMonth   = Utility.Converter.GetSmallInteger(dt.Rows[0]["FinancialMonth"]);
            p.FinancialBegYear = Utility.Converter.GetSmallInteger(dt.Rows[0]["FinancialBegYear"]);
            p.FinancialEndYear = Utility.Converter.GetSmallInteger(dt.Rows[0]["FinancialEndYear"]);
            p.CurrentMonth     = Utility.Converter.GetSmallInteger(dt.Rows[0]["CurrentMonth"]);
            p.CurrentYear      = Utility.Converter.GetSmallInteger(dt.Rows[0]["CurrentYear"]);
            p.LastVoucherNo    = Utility.Converter.GetString(dt.Rows[0]["LastVoucherNo"]);
            p.LastUpdateDate   = Utility.Converter.GetDateTime(dt.Rows[0]["LastUpdateDate"]);
            p.NumberOfUser     = Utility.Converter.GetSmallInteger(dt.Rows[0]["NumberOfUser"]);
            p.SingleUserFlag   = Utility.Converter.GetSmallInteger(dt.Rows[0]["SingleUserFlag"]);
            p.ProcessDate      = Utility.Converter.GetDateTime(dt.Rows[0]["ProcessDate"]);
            p.ProcessStatus    = Utility.Converter.GetSmallInteger(dt.Rows[0]["ProcessStatus"]);
            p.BackupStatus     = Utility.Converter.GetSmallInteger(dt.Rows[0]["BackupStatus"]);
            p.InstallDate      = Utility.Converter.GetDateTime(dt.Rows[0]["InstallDate"]);
            p.CashCode         = Utility.Converter.GetInteger(dt.Rows[0]["CashCode"]);
            p.ApprovBy         = Utility.Converter.GetSmallInteger(dt.Rows[0]["ApprovBy"]);
            p.ApprovByDate     = Utility.Converter.GetDateTime(dt.Rows[0]["ApprovByDate"]);
            p.DummyProcessDate = Utility.Converter.GetDateTime(dt.Rows[0]["DummyProcessDate"]);

            return(p);
        }
Пример #2
0
        public static A2ZACCOUNTDTO GetInfoAccNo(Int64 AccountNo)
        {
            A2ZCSPARAMETERDTO dto2  = A2ZCSPARAMETERDTO.GetParameterValue();
            DateTime          dt2   = Converter.GetDateTime(dto2.ProcessDate);
            string            date1 = dt2.ToString("dd/MM/yyyy");

            var prm1 = new object[3];

            prm1[0] = AccountNo;
            prm1[1] = Converter.GetDateToYYYYMMDD(date1);
            prm1[2] = 0;

            string input   = Converter.GetString(AccountNo);
            string AccType = input.Substring(0, 2);


            DataTable dt3 = BLL.CommonManager.Instance.GetDataTableBySpWithParams("SpM_GenerateSingleAccountBalance", prm1, "A2ZACGMS");

            //}
            //else if (AccType == "16")
            //{
            //    DataTable dt3 = BLL.CommonManager.Instance.GetDataTableBySpWithParams("SpM_GenerateSingleCashBalance", prm1, "A2ZACGMS");
            //}
            //else
            //{
            //    DataTable dt3 = BLL.CommonManager.Instance.GetDataTableBySpWithParams("SpM_GenerateSinglePartyBalance", prm1, "A2ZACGMS");
            //}



            var prm = new object[1];

            prm[0] = AccountNo;

            DataTable dt = BLL.CommonManager.Instance.GetDataTableBySpWithParams("Sp_GetInfoAccountNo", prm, "A2ZACGMS");


            var p = new A2ZACCOUNTDTO();

            if (dt.Rows.Count > 0)
            {
                p.Id = Converter.GetInteger(dt.Rows[0]["Id"]);

                p.AccType      = Converter.GetInteger(dt.Rows[0]["AccType"]);
                p.AccNo        = Converter.GetLong(dt.Rows[0]["AccNo"]);
                p.AccPartyNo   = Converter.GetInteger(dt.Rows[0]["AccPartyNo"]);
                p.Opendate     = Converter.GetDateTime(dt.Rows[0]["AccOpenDate"]);
                p.AccCurrency  = Converter.GetInteger(dt.Rows[0]["AccCurrency"]);
                p.AccStatus    = Converter.GetSmallInteger(dt.Rows[0]["AccStatus"]);
                p.AccBalance   = Converter.GetDecimal(dt.Rows[0]["AccBalance"]);
                p.AccPrincipal = Converter.GetDecimal(dt.Rows[0]["AccPrincipal"]);
                p.AccInterest  = Converter.GetDecimal(dt.Rows[0]["AccInterest"]);
                p.LastTrnDate  = Converter.GetDateTime(dt.Rows[0]["AccLastTrnDateU"]);
                p.LoanAmount   = Converter.GetDecimal(dt.Rows[0]["AccLoanAmt"]);

                p.AccLoanEffectingDate = Converter.GetDateTime(dt.Rows[0]["AccLoanEffectingDate"]);
                p.AccLoanExpiryDate    = Converter.GetDateTime(dt.Rows[0]["AccLoanExpiryDate"]);
                p.AccCalculateDays     = Converter.GetInteger(dt.Rows[0]["AccCalculateDays"]);

                p.AccIntRate = Converter.GetDecimal(dt.Rows[0]["AccIntRate"]);


                p.AccOpBal = Converter.GetDecimal(dt.Rows[0]["AccOpBal"]);


                p.a = Converter.GetSmallInteger(1);

                return(p);
            }
            else
            {
                p.AccType = 0;
                p.AccNo   = 0;
                p.a       = 0;
            }


            return(p);
        }