public override bool InsertAndUpdate(ExpertInfo oT) { TrainingCenterEntities oEntities = ConnectionEntities.getTrainingCenter(mAcount); Commons oCommons = new Commons(); if (oT.sSex == "Nam") oT.Sex = 1; else oT.Sex = 0; oT.Email = oCommons.EncryptInfo(oT.Email); oT.Mobile = oCommons.EncryptInfo(oT.Mobile); return oEntities.SP_INSERTUPDATE_EXPERT_INFO(oT.iFlag, oT.Id, oT.ExpertName, oT.DateBirthday, oT.Sex, oT.Address, oT.Description, oT.YearsExperience, oT.UniversityDegree, oT.CenterId, oT.Email, oT.Mobile, oT.ExpertCV) > 0 ? true : false; }
public override bool InsertAndUpdate(StudentLists oT) { TrainingCenterEntities oEntities = ConnectionEntities.getTrainingCenter(mAcount); byte bOption = 0; if (oT.Id == 0) { bOption = 1; //Insert } else { bOption = 0; //Update } Commons oCommons = new Commons(); oEntities.SP_Insert_Update_Student(bOption, oT.Id, oT.FirstName, oT.LastName, oT.FullName, oT.Sex, string.IsNullOrEmpty(oT.Mobile) ? "" : oCommons.EncryptInfo(oT.Mobile), oT.DateBirthday, string.IsNullOrEmpty(oT.Email) ? "" : oCommons.EncryptInfo(oT.Email), oT.Address, oT.DateCreate, oT.UserId, oT.CourseId, oT.StatusId, oT.Description); return(true); }
public string EncryptionMD5(string input) { return(oCommons.EncryptInfo(input)); }