Exemple #1
0
        public static int UpdateInformation01(A2ZLOANDEFAULTERDTO dto)
        {
            var prm = new object[11];

            prm[0]  = dto.BranchNo;
            prm[1]  = dto.AccType;
            prm[2]  = dto.AccNo;
            prm[3]  = dto.MemType;
            prm[4]  = dto.MemNo;
            prm[5]  = dto.PayablePrincAmt;
            prm[6]  = dto.PayableIntAmt;
            prm[7]  = dto.CurrDuePrincAmt;
            prm[8]  = dto.CurrDueIntAmt;
            prm[9]  = dto.UserId;
            prm[10] = dto.TrnDate;

            BLL.CommonManager.Instance.GetDataTableBySpWithParams("Sp_CSLoanAccountDefaulterDataUpdate", prm, "A2ZACGMS");

            return(0);

            //int rowEffect = 0;
            //string strQuery = "UPDATE A2ZLOANDEFAULTER set PayablePrincAmt='" + dto.PayablePrincAmt + "',PayableIntAmt='" + dto.PayableIntAmt + "', CurrDuePrincAmt='" + dto.CurrDuePrincAmt + "',CurrDueIntAmt='" + dto.CurrDueIntAmt + "' where BranchNo='" + dto.BranchNo + "' and TrnDate='" + dto.TrnDate + "' and MemType='" + dto.MemType + "' and MemNo='" + dto.MemNo + "' and AccType='" + dto.AccType + "' and AccNo='" + dto.AccNo + "'";
            //rowEffect = Converter.GetInteger(BLL.CommonManager.Instance.ExecuteNonQuery(strQuery, "A2ZACGMS"));
            //if (rowEffect == 0)
            //{
            //    return 0;
            //}
            //else
            //{
            //    return 1;
            //}
        }
Exemple #2
0
        public static A2ZLOANDEFAULTERDTO GetLoanInformation(int BranchNo, DateTime TrnDate, Int16 MemType, int MemNo, int AccType, Int64 AccNo)
        {
            var prm = new object[6];

            prm[0] = BranchNo;
            prm[1] = TrnDate;
            prm[2] = MemType;
            prm[3] = MemNo;
            prm[4] = AccType;
            prm[5] = AccNo;


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

            //DataTable dt = BLL.CommonManager.Instance.GetDataTableByQuery("SELECT * FROM A2ZDESIGNATION WHERE DesigCode = " + Designcode, "A2ZCSMCUS");


            var p = new A2ZLOANDEFAULTERDTO();

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

                p.TrnDate = Converter.GetDateTime(dt.Rows[0]["TrnDate"]);
                p.MemType = Converter.GetSmallInteger(dt.Rows[0]["MemType"]);

                p.MemNo           = Converter.GetInteger(dt.Rows[0]["MemNo"]);
                p.AccType         = Converter.GetSmallInteger(dt.Rows[0]["AccType"]);
                p.AccNo           = Converter.GetLong(dt.Rows[0]["AccNo"]);
                p.CalPrincAmt     = Converter.GetDecimal(dt.Rows[0]["CalPrincAmt"]);
                p.CalIntAmt       = Converter.GetDecimal(dt.Rows[0]["CalIntAmt"]);
                p.UptoDuePrincAmt = Converter.GetDecimal(dt.Rows[0]["UptoDuePrincAmt"]);
                p.UptoDueIntAmt   = Converter.GetDecimal(dt.Rows[0]["UptoDueIntAmt"]);
                p.PayablePrincAmt = Converter.GetDecimal(dt.Rows[0]["PayablePrincAmt"]);
                p.PayableIntAmt   = Converter.GetDecimal(dt.Rows[0]["PayableIntAmt"]);
                p.PayablePenalAmt = Converter.GetDecimal(dt.Rows[0]["PayablePenalAmt"]);
                p.PaidPrincAmt    = Converter.GetDecimal(dt.Rows[0]["PaidPrincAmt"]);
                p.PaidIntAmt      = Converter.GetDecimal(dt.Rows[0]["PaidIntAmt"]);
                p.PaidPenalAmt    = Converter.GetDecimal(dt.Rows[0]["PaidPenalAmt"]);
                p.CurrDuePrincAmt = Converter.GetDecimal(dt.Rows[0]["CurrDuePrincAmt"]);
                p.CurrDueIntAmt   = Converter.GetDecimal(dt.Rows[0]["CurrDueIntAmt"]);
                p.UptoPaidDate    = Converter.GetDateTime(dt.Rows[0]["UptoPaidDate"]);

                return(p);
            }
            p.MemType = 0;

            return(p);
        }
        public static int UpdateInformation01(A2ZLOANDEFAULTERDTO dto)
        {
            var prm = new object[7];

            prm[0] = dto.TrnDate;
            prm[1] = dto.CuType;
            prm[2] = dto.CuNo;
            prm[3] = dto.MemNo;
            prm[4] = dto.AccType;
            prm[5] = dto.AccNo;
            prm[6] = dto.CurrDueIntAmt;

            BLL.CommonManager.Instance.GetDataTableBySpWithParams("Sp_CSLoanAccountDefaulterDataUpdate", prm, "A2ZCSMCUS");

            return(0);
        }
        public static A2ZLOANDEFAULTERDTO GetLoanInformation(DateTime TrnDate, Int16 CuType, int CuNo, int MemNo, int AccType, Int64 AccNo)
        {
            var prm1 = new object[1];

            prm1[0] = AccNo;

            DataTable dt0 = BLL.CommonManager.Instance.GetDataTableBySpWithParams("Sp_CSGenerateTodaysLoanDeposit", prm1, "A2ZCSMCUS");

            DataTable dt1 = BLL.CommonManager.Instance.GetDataTableByQuery("SELECT * FROM A2ZACCOUNT WHERE AccType = '" + AccType + "' and AccNo = '" +
                                                                           AccNo + "' and CuType='" + CuType + "' and CuNo='" + CuNo + "' and MemNo='" + MemNo + "'", "A2ZCSMCUS");


            var p = new A2ZLOANDEFAULTERDTO();

            if (dt1.Rows.Count > 0)
            {
                p.CalPaidDeposit  = Converter.GetDecimal(dt1.Rows[0]["CalPaidDeposit"]);
                p.CalPaidInterest = Converter.GetDecimal(dt1.Rows[0]["CalPaidInterest"]);
                p.CalPaidPenal    = Converter.GetDecimal(dt1.Rows[0]["CalPaidPenal"]);
            }

            var prm = new object[6];

            prm[0] = TrnDate;
            prm[1] = CuType;
            prm[2] = CuNo;
            prm[3] = MemNo;
            prm[4] = AccType;
            prm[5] = AccNo;


            DataTable dt = BLL.CommonManager.Instance.GetDataTableBySpWithParams("Sp_CSGetInfoLoanDefaulter", prm, "A2ZCSMCUS");

            //DataTable dt = BLL.CommonManager.Instance.GetDataTableByQuery("SELECT * FROM A2ZDESIGNATION WHERE DesigCode = " + Designcode, "A2ZCSMCUS");



            if (dt.Rows.Count > 0)
            {
                p.TrnDate         = Converter.GetDateTime(dt.Rows[0]["TrnDate"]);
                p.CuType          = Converter.GetSmallInteger(dt.Rows[0]["CuType"]);
                p.CuNo            = Converter.GetInteger(dt.Rows[0]["CuNo"]);
                p.MemNo           = Converter.GetInteger(dt.Rows[0]["MemNo"]);
                p.AccType         = Converter.GetSmallInteger(dt.Rows[0]["AccType"]);
                p.AccNo           = Converter.GetLong(dt.Rows[0]["AccNo"]);
                p.CalPrincAmt     = Converter.GetDecimal(dt.Rows[0]["CalPrincAmt"]);
                p.CalIntAmt       = Converter.GetDecimal(dt.Rows[0]["CalIntAmt"]);
                p.UptoDuePrincAmt = Converter.GetDecimal(dt.Rows[0]["UptoDuePrincAmt"]);
                p.UptoDueIntAmt   = Converter.GetDecimal(dt.Rows[0]["UptoDueIntAmt"]);
                p.PayablePrincAmt = Converter.GetDecimal(dt.Rows[0]["PayablePrincAmt"]);
                p.PayableIntAmt   = Converter.GetDecimal(dt.Rows[0]["PayableIntAmt"]);
                p.PayablePenalAmt = Converter.GetDecimal(dt.Rows[0]["PayablePenalAmt"]);
                p.PaidPrincAmt    = Converter.GetDecimal(dt.Rows[0]["PaidPrincAmt"]);
                p.PaidIntAmt      = Converter.GetDecimal(dt.Rows[0]["PaidIntAmt"]);
                p.PaidPenalAmt    = Converter.GetDecimal(dt.Rows[0]["PaidPenalAmt"]);
                p.CurrDuePrincAmt = Converter.GetDecimal(dt.Rows[0]["CurrDuePrincAmt"]);
                p.CurrDueIntAmt   = Converter.GetDecimal(dt.Rows[0]["CurrDueIntAmt"]);


                p.CurrDuePrincAmt = (p.CurrDuePrincAmt - p.CalPaidDeposit);
                p.CurrDueIntAmt   = (p.CurrDueIntAmt - p.CalPaidInterest);



                return(p);
            }
            p.CuType = 0;

            return(p);
        }