コード例 #1
0
        public bool Update(ASPMGroup_DO MGroup, List <ASPMGroupD_DO> MGroupD)
        {
            bool   Result = true;
            string Values = "  KdMGroup = " + ASPCast.SQLStr(MGroup.KdMGroup)
                            + ", NmMGroup = " + ASPCast.SQLStr(MGroup.NmMGroup)
                            + ", IdMManager = " + ASPCast.SQLIntToStr(MGroup.IdMManager)
                            + ", Aktif = " + ASPCast.SQLBoolToStr(MGroup.Aktif)
                            + ", IdMUserCreate = " + ASPCast.SQLIntToStr(MGroup.IdMUserCreate)
                            + ", TglCreate = " + ASPCast.SQLDateTimeToStr(MGroup.TglCreate)
                            + ", IdMUserUpdate = " + ASPCast.SQLIntToStr(MGroup.IdMUserUpdate)
                            + ", TglUpdate = " + ASPCast.SQLDateTimeToStr(MGroup.TglUpdate);

            string condition = " WHERE IdMGroup = " + ASPCast.SQLIntToStr(MGroup.IdMGroup);

            string query = "UPDATE " + TABLENAME + " SET " + Values + condition;

            if (Result)
            {
                Result = GGroupD_DBC.Delete(MGroup.IdMGroup);
            }

            if (Result)
            {
                Result = GGroupD_DBC.Insert(MGroupD);
            }

            if (Result)
            {
                Result = aspQuery.ExecCUD(query);
            }

            return(Result);
        }
コード例 #2
0
        public bool Insert(ASPMGroup_DO MGroup, List <ASPMGroupD_DO> MGroupD)
        {
            bool   Result = true;
            string Values = ASPCast.SQLIntToStr(GetNewId()) + ", " +
                            ASPCast.SQLStr(MGroup.KdMGroup) + ", " +
                            ASPCast.SQLStr(MGroup.NmMGroup) + ", " +
                            ASPCast.SQLIntToStr(MGroup.IdMManager) + ", " +
                            ASPCast.SQLBoolToStr(MGroup.Aktif) + ", " +
                            ASPCast.SQLIntToStr(MGroup.IdMUserCreate) + ", " +
                            ASPCast.SQLDateTimeToStr(MGroup.TglCreate) + ", " +
                            ASPCast.SQLIntToStr(MGroup.IdMUserUpdate) + ", " +
                            ASPCast.SQLDateTimeToStr(MGroup.TglUpdate) + ", " +
                            ASPCast.SQLBoolToStr(MGroup.Hapus);

            string query = "INSERT INTO " + TABLENAME + " (" + FIELDNAME + ") VALUES (" + Values + ")";

            if (Result)
            {
                Result = GGroupD_DBC.Insert(MGroupD);
            }

            if (Result)
            {
                Result = aspQuery.ExecCUD(query);
            }

            return(Result);
        }
コード例 #3
0
        public bool Delete(ASPMKaryawan_DO MKaryawan)
        {
            string Values = "IdMUserUpdate = " + ASPCast.SQLIntToStr(MKaryawan.IdMUserUpdate)
                            + ", TglUpdate = " + ASPCast.SQLDateTimeToStr(MKaryawan.TglUpdate)
                            + ", Hapus = " + ASPCast.SQLBoolToStr(MKaryawan.Hapus);

            string Condition = " WHERE IdMKaryawan = " + ASPCast.SQLIntToStr(MKaryawan.IdMKaryawan);

            string Query = "UPDATE " + TABLENAME + " SET " + Values + Condition;

            return(aspQuery.ExecCUD(Query));
        }
コード例 #4
0
        public bool Update(ASPMJabatan_DO MJabatan)
        {
            string Values = "  KdMJabatan = " + ASPCast.SQLStr(MJabatan.KdMJabatan)
                            + ", NmMJabatan = " + ASPCast.SQLStr(MJabatan.NmMJabatan)
                            + ", Aktif = " + ASPCast.SQLBoolToStr(MJabatan.Aktif)
                            + ", IdMUserCreate = " + ASPCast.SQLIntToStr(MJabatan.IdMUserCreate)
                            + ", TglCreate = " + ASPCast.SQLDateTimeToStr(MJabatan.TglCreate)
                            + ", IdMUserUpdate = " + ASPCast.SQLIntToStr(MJabatan.IdMUserUpdate)
                            + ", TglUpdate = " + ASPCast.SQLDateTimeToStr(MJabatan.TglUpdate);

            string condition = " WHERE IdMJabatan = " + ASPCast.SQLIntToStr(MJabatan.IdMJabatan);

            string query = "UPDATE " + TABLENAME + " SET " + Values + condition;

            return(aspQuery.ExecCUD(query));
        }
コード例 #5
0
        public bool Insert(ASPMJabatan_DO MJabatan)
        {
            string Values = ASPCast.SQLIntToStr(GetNewId()) + ", " +
                            ASPCast.SQLStr(MJabatan.KdMJabatan) + ", " +
                            ASPCast.SQLStr(MJabatan.NmMJabatan) + ", " +
                            ASPCast.SQLBoolToStr(MJabatan.Aktif) + ", " +
                            ASPCast.SQLIntToStr(MJabatan.IdMUserCreate) + ", " +
                            ASPCast.SQLDateTimeToStr(MJabatan.TglCreate) + ", " +
                            ASPCast.SQLIntToStr(MJabatan.IdMUserUpdate) + ", " +
                            ASPCast.SQLDateTimeToStr(MJabatan.TglUpdate) + ", " +
                            ASPCast.SQLBoolToStr(MJabatan.Hapus);

            string query = "INSERT INTO " + TABLENAME + " (" + FIELDNAME + ") VALUES (" + Values + ")";

            return(aspQuery.ExecCUD(query));
        }