public string addNewTeacher(Teacher userPerInfo) { try { userPerInfo.user_crdate = DateTime.Now; userPerInfo.user_isactive = true; //userlocked //user_failedattempt //user_lockedtilldate //user_crby //user_upddate int userid = objUserInfoDAL.getUserId(userPerInfo.user_email); if (userid == 0) { objUserInfoDAL.addNewUser(userPerInfo); userid = objUserInfoDAL.getUserId(userPerInfo.user_email); userPerInfo.user_id = userid; objUserInfoDAL.saveUserPersonalInfo(userPerInfo); objUserInfoDAL.saveTeacherInfo(userPerInfo); return("Success"); } else { return("User Exists"); } } catch (Exception ex) { CubitExceptionUtility.CubitExceptionLog(ex.Message + "BAL: Error while passing teacher details in to the DAL" + ex.StackTrace + " " + ex.InnerException, this.GetType().BaseType.Name.ToString(), DateTime.Now.ToLongTimeString(), DateTime.Now.ToLongDateString()); return("error"); } }