public LessonPlanDetailModel ToObj(LessonPlanDetail LessonsPlan) { if (LessonsPlan != null) { LessonPlanDetailModel obj = new LessonPlanDetailModel() { Id = LessonsPlan.Id, CreatedBy = LessonsPlan.CreatedBy, CreatedOn = Convert.ToDateTime(LessonsPlan.CreatedOn).ToShortDateString(), FileExtnsion = LessonsPlan.FileExtnsion, URL = LessonsPlan.URL, // LessonsPlanMaster= LessonsPlan.LessonsPlanMaster, ModifiedBy = LessonsPlan.ModifiedBy, ModifiedOn = LessonsPlan.ModifiedOn, Reference = LessonsPlan.Reference, ShowFileName = LessonsPlan.ShowFileName, Category = LessonsPlan.Category, TeacherRemarks = LessonsPlan.TeacherRemarks, Day = Convert.ToDateTime(LessonsPlan.CreatedFor).DayOfWeek.ToString(), Subject = LessonsPlan.Subject, Clas = LessonsPlan.Class, MasterId = LessonsPlan.Master_Id, HOSRemarks = LessonsPlan.HOSRemarks, Teacher = LessonsPlan.CreatedBy, IsApproved = LessonsPlan.IsApproved, IsActive = LessonsPlan.IsActive, Datefor = Convert.ToDateTime(LessonsPlan.CreatedFor).ToShortDateString() }; return(obj); } return(null); }
public LessonPlanDetail ToObj(LessonPlanDetail LessonPlan, LessonPlanDetailModel LessonsPlanmodel) { if (LessonPlan != null) { LessonPlan.Id = LessonsPlanmodel.Id; LessonPlan.CreatedBy = LessonsPlanmodel.CreatedBy; LessonPlan.CreatedOn = Convert.ToDateTime(LessonsPlanmodel.CreatedOn); LessonPlan.FileExtnsion = LessonsPlanmodel.FileExtnsion; LessonPlan.URL = LessonsPlanmodel.URL; // LessonsPlanMaster= LessonsPlan.LessonsPlanMaster, LessonPlan.Master_Id = LessonsPlanmodel.MasterId; LessonPlan.ModifiedBy = LessonsPlanmodel.ModifiedBy; LessonPlan.ModifiedOn = LessonsPlanmodel.ModifiedOn; LessonPlan.Reference = LessonsPlanmodel.Reference; LessonPlan.ShowFileName = LessonsPlanmodel.ShowFileName; LessonPlan.CategoryId = LessonsPlanmodel.CategoryId; return(LessonPlan); } return(null); }
public LessonPlanDetail ToObj(LessonPlanDetailModel LessonsPlan) { if (LessonsPlan != null) { LessonPlanDetail obj = new LessonPlanDetail() { Id = LessonsPlan.Id, CreatedBy = LessonsPlan.CreatedBy, CreatedOn = Convert.ToDateTime(LessonsPlan.CreatedOn), FileExtnsion = LessonsPlan.FileExtnsion, URL = LessonsPlan.URL, // LessonsPlanMaster= LessonsPlan.LessonsPlanMaster, Master_Id = LessonsPlan.MasterId, ModifiedBy = LessonsPlan.ModifiedBy, ModifiedOn = LessonsPlan.ModifiedOn, Reference = LessonsPlan.Reference, ShowFileName = LessonsPlan.ShowFileName, CategoryId = LessonsPlan.CategoryId }; return(obj); } return(null); }