public string InsertDBWithLogin(string jsonValue, string loginValues) { SubjectModal subjectModal = Serializer.GetDeserialized<SubjectModal>(jsonValue); ILoginTableModal loginTable = Serializer.GetDeserialized<LoginTableModal>(loginValues); IUpdaterDetailTableModal upModal = new UpdaterDetailTableModal(); upModal.CreatedById = upModal.LastModifiedId = loginTable.Id; upModal.CreatedTime = upModal.LastModifiedTime = DateTime.Now; subjectModal.UpdateModal = upModal; SubjectAccessLayer subLayer = new SubjectAccessLayer(subjectModal); bool check = subLayer.InsertDB(Constants.SP_InsertSubject); return Serializer.GetSerialized<bool>(check); }
public string InsertDBWithLogin(string jsonValue, string loginValues) { CourseModal courseModal = Serializer.GetDeserialized<CourseModal>(jsonValue); ILoginTableModal loginTable = Serializer.GetDeserialized<LoginTableModal>(loginValues); IUpdaterDetailTableModal updateModal = new UpdaterDetailTableModal(); updateModal.CreatedById = updateModal.LastModifiedId = loginTable.Id; updateModal.CreatedTime = updateModal.LastModifiedTime = DateTime.Now; courseModal.UpdateModal = updateModal; CourseAccessLayer courseLayer = new CourseAccessLayer(courseModal); bool check = courseLayer.InsertDB(Constants.SP_InsertCourse); return Serializer.GetSerialized<bool>(check); }