コード例 #1
0
        public int Update(ZailiukaDto dto)
        {
            ZailiukaInfoEntity  zaiLiuKaInfoEntity  = new ZailiukaInfoEntity();
            QualificationEntity qualificationEntity = new QualificationEntity();
            MotivationEntity    motivationEntity    = new MotivationEntity();

            zaiLiuKaInfoEntity.IncludeAll();
            qualificationEntity.IncludeAll();
            motivationEntity.IncludeAll();


            zaiLiuKaInfoEntity.ZaiLiuKaNo  = dto.ZaiLiuKaNo;
            qualificationEntity.ZaiLiuKaNo = dto.ZaiLiuKaNo;
            motivationEntity.ZaiLiuKaNo    = dto.ZaiLiuKaNo;

            zaiLiuKaInfoEntity.UserName = dto.UserName;

            zaiLiuKaInfoEntity.Sex        = dto.Sex;
            zaiLiuKaInfoEntity.Birthday   = Convert.ToDateTime(dto.Birthday);
            zaiLiuKaInfoEntity.PermitDay  = dto.PermitDay;
            zaiLiuKaInfoEntity.Adress     = dto.Adress;
            zaiLiuKaInfoEntity.UpdateTime = DateTime.Now;
            zaiLiuKaInfoEntity.Flg        = "1";



            qualificationEntity.Type       = dto.Qualification;
            qualificationEntity.UpdateTime = DateTime.Now;
            qualificationEntity.Memo       = "無し";
            qualificationEntity.Flg        = "1";


            motivationEntity.Type       = dto.Motivation;
            motivationEntity.UpdateTime = DateTime.Now;
            motivationEntity.Memo       = "無し";
            motivationEntity.Flg        = "1";
            zaiLiuKaInfoEntity.Include(a => new { a.ZaiLiuKaNo, a.UserName, a.Sex, a.Birthday, a.PermitDay, a.Adress, a.UpdateTime, a.Memo, a.Flg });
            zaiLiuKaInfoEntity.Where(a => a.ZaiLiuKaNo == dto.ZaiLiuKaNo);
            this.ZailiukaInfo.Update(zaiLiuKaInfoEntity);

            qualificationEntity.Include(a => new { a.ZaiLiuKaNo, a.Type, a.Memo, a.Flg });
            qualificationEntity.Where(a => a.ZaiLiuKaNo == dto.ZaiLiuKaNo);
            this.Qualification.Update(qualificationEntity);

            motivationEntity.Include(a => new { a.ZaiLiuKaNo, a.Type, a.Memo, a.Flg });
            motivationEntity.Where(a => a.ZaiLiuKaNo == dto.ZaiLiuKaNo);
            int line = this.Motivation.Update(motivationEntity);

            return(line);
        }
コード例 #2
0
        public int Delete(string zaiLiuKaNo)
        {
            ZailiukaInfoEntity  zaiLiuKaInfoEntity  = new ZailiukaInfoEntity();
            QualificationEntity qualificationEntity = new QualificationEntity();
            MotivationEntity    motivationEntity    = new MotivationEntity();

            zaiLiuKaInfoEntity.IncludeAll();
            qualificationEntity.IncludeAll();
            motivationEntity.IncludeAll();

            zaiLiuKaInfoEntity.Where(a => a.ZaiLiuKaNo == zaiLiuKaNo);
            zaiLiuKaInfoEntity = this.ZailiukaInfo.GetSingle(zaiLiuKaInfoEntity);

            //zaiLiuKaInfoEntity.IncludeFlg(true);
            zaiLiuKaInfoEntity.Flg = "0";
            zaiLiuKaInfoEntity.Include(a => new { a.ZaiLiuKaNo, a.UserName, a.Sex, a.Birthday, a.PermitDay, a.Adress, a.UpdateTime, a.Memo, a.Flg });
            zaiLiuKaInfoEntity.Where(a => a.ZaiLiuKaNo == zaiLiuKaNo);
            this.ZailiukaInfo.Update(zaiLiuKaInfoEntity);


            qualificationEntity.Where(a => a.ZaiLiuKaNo == zaiLiuKaNo);
            qualificationEntity = this.Qualification.GetSingle(qualificationEntity);
            //qualificationEntity.IncludeFlg(true);
            qualificationEntity.Flg = "0";
            qualificationEntity.Include(a => new { a.ZaiLiuKaNo, a.Type, a.Memo, a.Flg });
            qualificationEntity.Where(a => a.ZaiLiuKaNo == zaiLiuKaNo);
            this.Qualification.Update(qualificationEntity);


            motivationEntity.Where(a => a.ZaiLiuKaNo == zaiLiuKaNo);
            motivationEntity = this.Motivation.GetSingle(motivationEntity);
            //motivationEntity.IncludeFlg(true);
            motivationEntity.Flg = "0";
            motivationEntity.Include(a => new { a.ZaiLiuKaNo, a.Type, a.Memo, a.Flg });
            motivationEntity.Where(a => a.ZaiLiuKaNo == zaiLiuKaNo);
            int line = this.Motivation.Update(motivationEntity);

            return(line);
        }