Example #1
0
        public static A2ZGROUPTRNDTO GetSummaryInformation(int memNo, Int16 userId)
        {
            DataTable dt       = new DataTable();
            string    strQuery = @"SELECT SUM(InputDeposit) AS 'totDeposit',SUM(InputInterest) AS 'totInterest',
                            SUM(InputPenalty) AS 'totPenalty' FROM A2ZGROUPTRN WHERE MEMNO = " + memNo +
                                 " AND UserId = " + userId;

            dt = BLL.CommonManager.Instance.GetDataTableByQuery(strQuery, "A2ZMCUS");
            var p = new A2ZGROUPTRNDTO();

            if (dt.Rows.Count > 0)

            {
                p.InputDeposit  = Converter.GetDecimal(dt.Rows[0]["totDeposit"]);
                p.InputInterest = Converter.GetDecimal(dt.Rows[0]["totInterest"]);
                p.InputPenalty  = Converter.GetDecimal(dt.Rows[0]["totPenalty"]);
                return(p);
            }

            p.MEMNO   = 0;
            p.ACCTYPE = 0;
            p.ACCNO   = 0;

            return(p);
        }
Example #2
0
        public static A2ZGROUPTRNDTO GetInformationByID(int id)
        {
            DataTable dt       = new DataTable();
            string    strQuery = "SELECT * FROM A2ZGROUPTRN WHERE ID='" + id;

            dt = BLL.CommonManager.Instance.GetDataTableByQuery(strQuery, "A2ZMCUS");
            var p = new A2ZGROUPTRNDTO();

            if (dt.Rows.Count > 0)
            {
                p.ID              = Converter.GetInteger(dt.Rows[0]["ID"]);
                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.GLACCNO         = Converter.GetInteger(dt.Rows[0]["GLACCNO"]);
                p.TrnPayType      = Converter.GetSmallInteger(dt.Rows[0]["TrnPayType"]);
                p.InterestCode    = Converter.GetInteger(dt.Rows[0]["InterestCode"]);
                p.InterestPayType = Converter.GetSmallInteger(dt.Rows[0]["InterestPayType"]);
                p.PenaltyCode     = Converter.GetInteger(dt.Rows[0]["PenaltyCode"]);
                p.PenaltyPayType  = Converter.GetSmallInteger(dt.Rows[0]["PenaltyPayType"]);
                p.LRFCode         = Converter.GetInteger(dt.Rows[0]["LRFCode"]);
                p.LRFPayType      = Converter.GetSmallInteger(dt.Rows[0]["LRFPayType"]);
                p.OtherCode       = Converter.GetInteger(dt.Rows[0]["OtherCode"]);
                p.OtherPayType    = Converter.GetSmallInteger(dt.Rows[0]["OtherPayType"]);
                p.GRPNAME         = Converter.GetString(dt.Rows[0]["GRPNAME"]);
                p.AtyClass        = Converter.GetSmallInteger(dt.Rows[0]["AtyClass"]);
                p.BRNO            = Converter.GetInteger(dt.Rows[0]["BRNO"]);
                p.REGNO           = Converter.GetInteger(dt.Rows[0]["REGNO"]);
                p.SUBREGNO        = Converter.GetInteger(dt.Rows[0]["SUBREGNO"]);
                p.COLCODE         = Converter.GetInteger(dt.Rows[0]["COLCODE"]);
                p.ACCSTAT         = Converter.GetSmallInteger(dt.Rows[0]["ACCSTAT"]);
                p.ACCBALANCE      = Converter.GetDecimal(dt.Rows[0]["ACCBALANCE"]);
                p.ACCOPENDT       = Converter.GetDateTime(dt.Rows[0]["ACCOPENDT"]);
                p.ACCLASTDT       = Converter.GetDateTime(dt.Rows[0]["ACCLASTDT"]);
                p.ACCINTRATE      = Converter.GetDecimal(dt.Rows[0]["ACCINTRATE"]);
                p.ACCINSTNO       = Converter.GetInteger(dt.Rows[0]["ACCINSTNO"]);
                p.ACCINSTAMT      = Converter.GetDecimal(dt.Rows[0]["ACCINSTAMT"]);
                p.ACC2NDINSTAMT   = Converter.GetDecimal(dt.Rows[0]["ACC2NDINSTAMT"]);
                p.ACCLASTAMT      = Converter.GetDecimal(dt.Rows[0]["ACCLASTAMT"]);
                p.ACCMTHDEP       = Converter.GetDecimal(dt.Rows[0]["ACCMTHDEP"]);
                p.CalDeposit      = Converter.GetDecimal(dt.Rows[0]["CalDeposit"]);
                p.CalInterest     = Converter.GetDecimal(dt.Rows[0]["CalInterest"]);
                p.CalPenalty      = Converter.GetDecimal(dt.Rows[0]["CalPenalty"]);
                p.CalOther        = Converter.GetDecimal(dt.Rows[0]["CalOther"]);
                p.InputDeposit    = Converter.GetDecimal(dt.Rows[0]["InputDeposit"]);
                p.InputInterest   = Converter.GetDecimal(dt.Rows[0]["InputInterest"]);
                p.InputPenalty    = Converter.GetDecimal(dt.Rows[0]["InputPenalty"]);
                p.InputOther      = Converter.GetDecimal(dt.Rows[0]["InputOther"]);
                p.UserId          = Converter.GetSmallInteger(dt.Rows[0]["UserId"]);
                p.BoothCode       = Converter.GetSmallInteger(dt.Rows[0]["BoothCode"]);
                p.CreateDate      = Converter.GetDateTime(dt.Rows[0]["CreateDate"]);
                return(p);
            }

            p.MEMNO   = 0;
            p.ACCTYPE = 0;
            p.ACCNO   = 0;

            return(p);
        }
Example #3
0
        public static int UpdateGroupTransaction(A2ZGROUPTRNDTO grpTrnDto)
        {
            int    result   = 0;
            string strQuery = "UPDATE A2ZGROUPTRN SET InputDeposit = " + grpTrnDto.InputDeposit + ",InputInterest = " + grpTrnDto.InputInterest +
                              ",InputPenalty = " + grpTrnDto.InputPenalty + " WHERE ID = " + grpTrnDto.ID;

            result = Converter.GetInteger(CommonManager.Instance.ExecuteNonQuery(strQuery, "A2ZMCUS"));

            return(result);
        }