public override ExpertInfo getElementById(object id) { TrainingCenterEntities oEntities = ConnectionEntities.getTrainingCenter(mAcount); var oData = oEntities.SP_GETELEMENT_BYID_EXPERT_INFO((int)id).ToList(); ExpertInfo oExpertInfo = new ExpertInfo(); Commons oCommons = new Commons(); if (oData != null) { foreach (var o in oData) { if (o.Sex == 1) oExpertInfo.sSex = "Nam"; else oExpertInfo.sSex = "Nữ"; oExpertInfo.Id = o.Id; oExpertInfo.ExpertName = o.ExpertName; oExpertInfo.DateBirthday = o.DateBirthday; oExpertInfo.Email = oCommons.DecryptInfo(o.Email); oExpertInfo.Mobile = oCommons.DecryptInfo(o.Mobile); oExpertInfo.Address = o.Address; oExpertInfo.CenterName = o.CenterName; oExpertInfo.YearsExperience = o.YearsExperience; oExpertInfo.UniversityDegree = o.UniversityDegree; oExpertInfo.CenterId = o.CenterId; return oExpertInfo; } } return oExpertInfo; }
public override List <StudentClasses> CheckElementByObject(StudentClasses oT) { TrainingCenterEntities oEntities = ConnectionEntities.getTrainingCenter(mAcount); var oData = oEntities.SP_GETLITSTUDENT_BYID_CLASS_02(oT.ClassId).ToList(); List <StudentClasses> olisStudentClasses = new List <StudentClasses>(); Commons oCommons = new Commons(); foreach (var o in oData) { StudentClasses oStudentClasses = new StudentClasses(); oStudentClasses.Id = o.Id; oStudentClasses.ClassId = (int)o.ClassId; //oStudentClasses.ClassName = o.ClassName; oStudentClasses.DateStart = (DateTime)o.DateStart; oStudentClasses.FullName = o.FullName; oStudentClasses.Email = string.IsNullOrEmpty(o.Email) ? "" : oCommons.DecryptInfo(o.Email); //oStudentClasses.FullName = o.FullName; oStudentClasses.Mobile = string.IsNullOrEmpty(o.Mobile) ? "" : oCommons.DecryptInfo(o.Mobile); oStudentClasses.Sex = (int)o.Sex; if (oStudentClasses.Sex == 0) { oStudentClasses.sSex = "Nam"; } else { oStudentClasses.sSex = "Nữ"; } //oStudentClasses.sSex = o.sSex; oStudentClasses.StudentId = (int)o.StudentId; oStudentClasses.TotalPrice = string.IsNullOrEmpty("" + o.TotalPrice) ? 0 : (int)o.TotalPrice; oStudentClasses.Price1 = string.IsNullOrEmpty("" + o.Price1) ? 0 : (int)o.Price1; oStudentClasses.Price2 = string.IsNullOrEmpty("" + o.Price2) ? 0 : (int)o.Price2; oStudentClasses.Price3 = string.IsNullOrEmpty("" + o.Price3) ? 0 : (int)o.Price3; oStudentClasses.MustPay = string.IsNullOrEmpty("" + o.MustPay) ? 0 : (int)o.MustPay; olisStudentClasses.Add(oStudentClasses); } return(olisStudentClasses); }
public override List <OfflineStudentRegisters> getElementByTime(DateTime dtStartTime, DateTime dtEndTime) { TrainingCenterEntities oEntities = ConnectionEntities.getTrainingCenter(mAcount); var oData = oEntities.SP_IMIC_Student_Register_Offline_ByTimes(dtStartTime, dtEndTime).ToList(); List <OfflineStudentRegisters> lisOffRegister = new List <OfflineStudentRegisters>(); Commons oCommons = new Commons(mAcount); foreach (var o in oData) { OfflineStudentRegisters oRegister = new OfflineStudentRegisters(); oRegister.RegisterDetailId = o.RegisterDetailId; oRegister.FullName = o.FullName; oRegister.Email = oCommons.DecryptInfo(o.Email); oRegister.Phone = oCommons.DecryptInfo(o.Phone); oRegister.Message = o.Message; oRegister.Address = o.Address; oRegister.CreatedTime = (DateTime)o.CreatedTime; oRegister.UpdateDateTime = (DateTime)o.UpdateDateTime; oRegister.UserName = o.UserName; lisOffRegister.Add(oRegister); } return(lisOffRegister.Count <= 0 ? null : lisOffRegister); }
public override List <StudentLists> getElementByTime(DateTime dtStartTime, DateTime dtEndTime) { TrainingCenterEntities oEntities = ConnectionEntities.getTrainingCenter(mAcount); if (mClasses != null) { var oData = oEntities.SP_GETLISTSTUDENT_NOTINCLASS_BYCLASSID_STUDENTS(dtStartTime.ToShortDateString(), mClasses.Id, dtEndTime.ToShortDateString()).ToList(); List <StudentLists> lisStudent = new List <StudentLists>(); Commons oCommons = new Commons(); foreach (var o in oData) { StudentLists oStudentLists = new StudentLists(); oStudentLists.Id = o.Id; oStudentLists.FullName = o.FullName; if (o.Sex == 0) { oStudentLists.SexString = "Nam"; } else { oStudentLists.SexString = "Nữ"; } oStudentLists.Sex = o.Sex; oStudentLists.Mobile = string.IsNullOrEmpty(o.Mobile) ? "" : /*o.Mobile*/ oCommons.DecryptInfo(o.Mobile); oStudentLists.DateBirthday = o.DateBirthday; oStudentLists.Email = string.IsNullOrEmpty(o.Email) ? "" : /*o.Email*/ oCommons.DecryptInfo(o.Email); oStudentLists.Address = o.Address; oStudentLists.DateBirthday = o.DateBirthday; oStudentLists.UserId = o.UserId; oStudentLists.UserName = o.UserName; oStudentLists.CourseId = o.CourseId; oStudentLists.CourseName = o.CourseName; oStudentLists.StatusId = o.StatusId; oStudentLists.StatusName = o.StatusName; oStudentLists.Description = o.Description; oStudentLists.DateCreate = (DateTime)o.DateCreate; lisStudent.Add(oStudentLists); } return(lisStudent.Count <= 0 ? null : lisStudent); } else { var oData = oEntities.SP_GETELEMENTS_BYDATE_STUDENTS(dtStartTime.ToShortDateString(), dtEndTime.ToShortDateString()).ToList(); List <StudentLists> lisStudent = new List <StudentLists>(); Commons oCommons = new Commons(); foreach (var o in oData) { StudentLists oStudentLists = new StudentLists(); oStudentLists.Id = o.Id; oStudentLists.FullName = o.FullName; if (o.Sex == 0) { oStudentLists.SexString = "Nam"; } else { oStudentLists.SexString = "Nữ"; } oStudentLists.Sex = o.Sex; oStudentLists.Mobile = string.IsNullOrEmpty(o.Mobile) ? "" : /*o.Mobile*/ oCommons.DecryptInfo(o.Mobile); oStudentLists.DateBirthday = o.DateBirthday; oStudentLists.Email = string.IsNullOrEmpty(o.Email) ? "" : /*o.Email*/ oCommons.DecryptInfo(o.Email); oStudentLists.Address = o.Address; oStudentLists.DateBirthday = o.DateBirthday; oStudentLists.UserId = o.UserId; oStudentLists.UserName = o.UserName; oStudentLists.CourseId = o.CourseId; oStudentLists.CourseName = o.CourseName; oStudentLists.StatusId = o.StatusId; oStudentLists.StatusName = o.StatusName; oStudentLists.Description = o.Description; oStudentLists.DateCreate = (DateTime)o.DateCreate; lisStudent.Add(oStudentLists); } return(lisStudent.Count <= 0 ? null : lisStudent); } }
public string DecryptionMD5(string input) { return(oCommons.DecryptInfo(input)); }