コード例 #1
0
        //public static int Update1(A2ZMEMBERDTO dto)
        //{

        //    int rowEffect = 0;
        //    string strQuery = "UPDATE A2ZMEMBER SET CuType ='" + dto.CuType + "',CuNo ='" + dto.CreditUnionNo + "' where  Id='" + dto.ID + "' ";
        //    rowEffect = Converter.GetInteger(BLL.CommonManager.Instance.ExecuteNonQuery(strQuery, "A2ZACGMS"));
        //    if (rowEffect == 0)
        //    {
        //        return 0;
        //    }
        //    else
        //    {
        //        return 1;
        //    }
        //}

        public static int Update2(A2ZMEMBERAPPDTO dto)
        {
            int    rowEffect = 0;
            string strQuery  = "UPDATE A2ZMEMBER SET MemType ='" + dto.MemType + "' where  Id='" + dto.ID + "' ";

            rowEffect = Converter.GetInteger(BLL.CommonManager.Instance.ExecuteNonQuery(strQuery, "A2ZACGMS"));
            if (rowEffect == 0)
            {
                return(0);
            }
            else
            {
                return(1);
            }
        }
コード例 #2
0
        public static int Update(A2ZMEMBERAPPDTO dto)
        {
            dto.MemberName = (dto.MemberName != null) ? dto.MemberName.Trim().Replace("'", "''") : "";
            int    rowEffect = 0;
            string strQuery  = "UPDATE A2ZMEMBER SET MemName='" + dto.MemberName + "' where  Id='" + dto.ID + "' ";

            rowEffect = Converter.GetInteger(BLL.CommonManager.Instance.ExecuteNonQuery(strQuery, "A2ZACGMS"));
            if (rowEffect == 0)
            {
                return(0);
            }
            else
            {
                return(1);
            }
        }
コード例 #3
0
        public static int Insert(A2ZMEMBERAPPDTO dto)
        {
            dto.MemberName = (dto.MemberName != null) ? dto.MemberName.Trim().Replace("'", "''") : "";
            int    rowEffect = 0;
            string strQuery  = @"INSERT into A2ZMEMBER(BranchNo,MemType,MemNo,MemName,MemOpenDate,MemType)values('" +
                               dto.BranchNo + "','" + dto.MemType + "','" + dto.MemberNo + "','" + dto.MemberName + "','" + dto.OpenDate + "','" + dto.MemType + "')";

            rowEffect = Converter.GetInteger(BLL.CommonManager.Instance.ExecuteNonQuery(strQuery, "A2ZACGMS"));

            if (rowEffect == 0)
            {
                return(0);
            }
            else
            {
                return(1);
            }
        }
コード例 #4
0
        public static int UpdateInformation(A2ZMEMBERAPPDTO dto)
        {
            SqlDateTime sqldatenull;

            sqldatenull = SqlDateTime.Null;

            SqlParameter param1 = new SqlParameter("@MemOpenDate", DBNull.Value);
            SqlParameter param2 = new SqlParameter("@MemDateOfBirth", DBNull.Value);
            SqlParameter param3 = new SqlParameter("@MemPPIssDt", DBNull.Value);
            SqlParameter param4 = new SqlParameter("@MemPPExpDt", DBNull.Value);
            SqlParameter param5 = new SqlParameter("@MemLastTaxDt", DBNull.Value);
            SqlParameter param6 = new SqlParameter("@MemAnniversaryDate", DBNull.Value);
            SqlParameter param7 = new SqlParameter("@MemIdIssueDt", DBNull.Value);
            SqlParameter param8 = new SqlParameter("@MemApplicationDate", DBNull.Value);

            if (dto.OpenNullDate == "")
            {
                param1 = new SqlParameter("@MemOpenDate", DBNull.Value);
            }
            else
            {
                param1 = new SqlParameter("@MemOpenDate", dto.OpenDate);
            }

            if (dto.DOBNullDate == "")
            {
                param2 = new SqlParameter("@MemDateOfBirth", DBNull.Value);
            }

            else
            {
                param2 = new SqlParameter("@MemDateOfBirth", dto.DateOfBirth);
            }


            if (dto.DOANullDate == "")
            {
                param6 = new SqlParameter("@MemAnniversaryDate", DBNull.Value);
            }

            else
            {
                param6 = new SqlParameter("@MemAnniversaryDate", dto.MemAnniversaryDate);
            }

            if (dto.PPIssueNullDate == "")
            {
                param3 = new SqlParameter("@MemPPIssDt", DBNull.Value);
            }
            else
            {
                param3 = new SqlParameter("@MemPPIssDt", dto.PassportIssueDate);
            }

            if (dto.PPExpNullDate == "")
            {
                param4 = new SqlParameter("@MemPPExpDt", DBNull.Value);
            }
            else
            {
                param4 = new SqlParameter("@MemPPExpDt", dto.PassportExpiryDate);
            }
            if (dto.LTaxPayNullDate == "")
            {
                param5 = new SqlParameter("@MemLastTaxDt", DBNull.Value);
            }
            else
            {
                param5 = new SqlParameter("@MemLastTaxDt", dto.LastTaxPayDate);
            }

            if (dto.IDIssueNullDate == "")
            {
                param7 = new SqlParameter("@MemIdIssueDt", DBNull.Value);
            }

            else
            {
                param7 = new SqlParameter("@MemIdIssueDt", dto.IDIssueDt);
            }

            if (dto.MemAppNullDate == "")
            {
                param8 = new SqlParameter("@MemApplicationDate", DBNull.Value);
            }

            else
            {
                param8 = new SqlParameter("@MemApplicationDate", dto.MemApplicationDate);
            }
            int result = Helper.SqlHelper.ExecuteNonQuery(DataAccessLayer.Constants.DBConstants.GetConnectionString("A2ZACGMS"), "Sp_CSMemberAppDataUpdate", new object[] { dto.ID, dto.UserId, dto.BranchNo, dto.MemType, dto.MemTypeDesc, dto.MemApplicationNo, param8, dto.MemberName, dto.FatherName, dto.MotherName, dto.SpouseName, dto.Occupation, dto.Nationality, dto.Gender, dto.Religion, dto.Nature, dto.MaritalStatus, param1, param2, dto.PlaceofBirth, dto.PreAddressLine1, dto.PreAddressLine2, dto.PreAddressLine3, dto.PreVillage, dto.PrePostOffice, dto.PreDivision, dto.PreDistrict, dto.preUpzila, dto.preThana, dto.PreTelephone, dto.PreMobile, dto.PreEmail, dto.PerAddressLine1, dto.PerAddressLine2, dto.PerAddressLine3, dto.PerVillage, dto.PerPostOffice, dto.PerDivision, dto.PerDistrict, dto.PerUpzila, dto.PerThana, dto.PerTelephone, dto.PerMobile, dto.PerEmail, dto.EmployerName, dto.EmployerAddress, dto.MemIntroMemType, dto.MemIntroMemNo, dto.IntroducerNo2, dto.IntroducerName2, dto.NationalIdNo, dto.PassportNo, param3, param4, dto.PassportIssuePlace, dto.TIN, param5, param6, dto.MemBloodGroup, dto.MemRegNo, dto.MemSubRegNo, dto.MemColCode, param7 });

            if (result == 0)
            {
                return(0);
            }
            else
            {
                return(1);
            }
        }
コード例 #5
0
        public static A2ZMEMBERAPPDTO GetOldInformation(Int16 CuType, int CUNo, int MemNo)
        {
            var prm = new object[4];

            prm[0] = CuType;
            prm[1] = CUNo;
            prm[2] = MemNo;
            prm[3] = 1;


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

            //DataTable dt = new DataTable();
            //string strQuery = "SELECT * FROM A2ZMEMBER WHERE CuType = '" + CuType + "' and CuNo = '" + CUNo + "' and MemNo='" + MemNo + "'";
            //dt = BLL.CommonManager.Instance.GetDataTableByQuery(strQuery, "A2ZCSMCUS");

            var p = new A2ZMEMBERAPPDTO();

            if (dt.Rows.Count > 0)
            {
                p.ID                 = Converter.GetInteger(dt.Rows[0]["Id"]);
                p.BranchNo           = Converter.GetInteger(dt.Rows[0]["BranchNo"]);
                p.MemType            = Converter.GetSmallInteger(dt.Rows[0]["MemType"]);
                p.MemberNo           = Converter.GetInteger(dt.Rows[0]["MemNo"]);
                p.MemberName         = Converter.GetString(dt.Rows[0]["MemName"]);
                p.FatherName         = Converter.GetString(dt.Rows[0]["MemFName"]);
                p.MotherName         = Converter.GetString(dt.Rows[0]["MemMName"]);
                p.SpouseName         = Converter.GetString(dt.Rows[0]["MemSpouseName"]);
                p.Occupation         = Converter.GetSmallInteger(dt.Rows[0]["MemOccupation"]);
                p.Nationality        = Converter.GetSmallInteger(dt.Rows[0]["MemNationality"]);
                p.Gender             = Converter.GetSmallInteger(dt.Rows[0]["MemGender"]);
                p.Religion           = Converter.GetSmallInteger(dt.Rows[0]["MemReligion"]);
                p.Nature             = Converter.GetSmallInteger(dt.Rows[0]["MemNature"]);
                p.MaritalStatus      = Converter.GetSmallInteger(dt.Rows[0]["MemMaritalStatus"]);
                p.OpenDate           = Converter.GetDateTime(dt.Rows[0]["MemOpenDate"]);
                p.DateOfBirth        = Converter.GetDateTime(dt.Rows[0]["MemDOB"]);
                p.PlaceofBirth       = Converter.GetString(dt.Rows[0]["MemPOB"]);
                p.PreAddressLine1    = Converter.GetString(dt.Rows[0]["MemPreAdd1"]);
                p.PreAddressLine2    = Converter.GetString(dt.Rows[0]["MemPreAdd2"]);
                p.PreAddressLine3    = Converter.GetString(dt.Rows[0]["MemPreAdd3"]);
                p.PreDivision        = Converter.GetInteger(dt.Rows[0]["MemPreDivi"]);
                p.PreDistrict        = Converter.GetInteger(dt.Rows[0]["MemPreDist"]);
                p.preUpzila          = Converter.GetInteger(dt.Rows[0]["MemPreUpzila"]);
                p.preThana           = Converter.GetInteger(dt.Rows[0]["MemPreThana"]);
                p.PreTelephone       = Converter.GetString(dt.Rows[0]["MemPreTelephone"]);
                p.PreMobile          = Converter.GetString(dt.Rows[0]["MemPreMobile"]);
                p.PreEmail           = Converter.GetString(dt.Rows[0]["MemPreEmail"]);
                p.PerAddressLine1    = Converter.GetString(dt.Rows[0]["MemPerAdd1"]);
                p.PerAddressLine2    = Converter.GetString(dt.Rows[0]["MemPerAdd2"]);
                p.PerAddressLine3    = Converter.GetString(dt.Rows[0]["MemPerAdd3"]);
                p.PerDivision        = Converter.GetInteger(dt.Rows[0]["MemPerDivi"]);
                p.PerDistrict        = Converter.GetInteger(dt.Rows[0]["MemPerDist"]);
                p.PerUpzila          = Converter.GetInteger(dt.Rows[0]["MemPerUpzila"]);
                p.PerThana           = Converter.GetInteger(dt.Rows[0]["MemPerThana"]);
                p.PerTelephone       = Converter.GetString(dt.Rows[0]["MemPerTelephone"]);
                p.PerMobile          = Converter.GetString(dt.Rows[0]["MemPerMobile"]);
                p.PerEmail           = Converter.GetString(dt.Rows[0]["MemPerEmail"]);
                p.EmployerName       = Converter.GetString(dt.Rows[0]["MemEmpNm"]);
                p.EmployerAddress    = Converter.GetString(dt.Rows[0]["MemEmpAdd"]);
                p.MemIntroMemType    = Converter.GetSmallInteger(dt.Rows[0]["MemIntroMemType"]);
                p.MemIntroMemNo      = Converter.GetInteger(dt.Rows[0]["MemIntroMemNo"]);
                p.IntroducerName2    = Converter.GetString(dt.Rows[0]["MemIntroMNo2"]);
                p.IntroducerNo2      = Converter.GetString(dt.Rows[0]["MemIntroNm2"]);
                p.NationalIdNo       = Converter.GetString(dt.Rows[0]["MemNationalId"]);
                p.PassportNo         = Converter.GetString(dt.Rows[0]["MemPPNo"]);
                p.PassportIssueDate  = Converter.GetDateTime(dt.Rows[0]["MemPPIssDt"]);
                p.PassportExpiryDate = Converter.GetDateTime(dt.Rows[0]["MemPPExpDt"]);
                p.PassportIssuePlace = Converter.GetString(dt.Rows[0]["MemPPIssPlace"]);
                p.TIN                = Converter.GetString(dt.Rows[0]["MemTin"]);
                p.LastTaxPayDate     = Converter.GetDateTime(dt.Rows[0]["MemLastTaxDt"]);
                p.IDIssueDt          = Converter.GetDateTime(dt.Rows[0]["MemIdIssueDt"]);

                p.OldMemNo = Converter.GetInteger(dt.Rows[0]["MemOldMemNo"]);

                p.MemNoGuarantor = Converter.GetSmallInteger(dt.Rows[0]["MemNoGuarantor"]);

                p.NoRecord = 1;
                return(p);
            }

            p.MemberNo = 0;
            p.NoRecord = 0;

            return(p);
        }