public Mem_EducationalInfo GetMem_EducationalInfoFromReader(IDataReader reader) { try { Mem_EducationalInfo mem_EducationalInfo = new Mem_EducationalInfo ( (int)reader["Mem_EducationalInfoID"], (int)reader["Mem_MemberID"], (int)reader["Comn_GegreeID"], reader["InstituteName"].ToString(), (int)reader["Comn_UniversityID"], (int)reader["Comn_DepartmentID"], reader["DegreeTitle"].ToString(), reader["YearOfPassing"].ToString(), (int)reader["Comn_ResultTypeID"], reader["Result"].ToString(), reader["Details"].ToString(), (int)reader["AddedBy"], (DateTime)reader["AddedDate"], (int)reader["ModifiedBy"], (DateTime)reader["ModifiedDate"], (int)reader["Comn_RowStatusID"] ); return(mem_EducationalInfo); } catch (Exception ex) { return(null); } }
public bool UpdateMem_Applied_EducationalInfo(Mem_EducationalInfo mem_EducationalInfo) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("IEB_UpdateMem_Applied_EducationalInfo", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@Mem_EducationalInfoID", SqlDbType.Int).Value = mem_EducationalInfo.Mem_EducationalInfoID; cmd.Parameters.Add("@Mem_MemberID", SqlDbType.Int).Value = mem_EducationalInfo.Mem_MemberID; cmd.Parameters.Add("@Comn_GegreeID", SqlDbType.Int).Value = mem_EducationalInfo.Comn_GegreeID; cmd.Parameters.Add("@InstituteName", SqlDbType.NVarChar).Value = mem_EducationalInfo.InstituteName; cmd.Parameters.Add("@Comn_UniversityID", SqlDbType.Int).Value = mem_EducationalInfo.Comn_UniversityID; cmd.Parameters.Add("@Comn_DepartmentID", SqlDbType.Int).Value = mem_EducationalInfo.Comn_DepartmentID; cmd.Parameters.Add("@DegreeTitle", SqlDbType.NVarChar).Value = mem_EducationalInfo.DegreeTitle; cmd.Parameters.Add("@YearOfPassing", SqlDbType.NVarChar).Value = mem_EducationalInfo.YearOfPassing; cmd.Parameters.Add("@Comn_ResultTypeID", SqlDbType.Int).Value = mem_EducationalInfo.Comn_ResultTypeID; cmd.Parameters.Add("@Result", SqlDbType.NVarChar).Value = mem_EducationalInfo.Result; cmd.Parameters.Add("@Details", SqlDbType.NText).Value = mem_EducationalInfo.Details; cmd.Parameters.Add("@AddedBy", SqlDbType.Int).Value = mem_EducationalInfo.AddedBy; cmd.Parameters.Add("@AddedDate", SqlDbType.DateTime).Value = mem_EducationalInfo.AddedDate; cmd.Parameters.Add("@ModifiedBy", SqlDbType.Int).Value = mem_EducationalInfo.ModifiedBy; cmd.Parameters.Add("@ModifiedDate", SqlDbType.DateTime).Value = mem_EducationalInfo.ModifiedDate; cmd.Parameters.Add("@Comn_RowStatusID", SqlDbType.Int).Value = mem_EducationalInfo.Comn_RowStatusID; connection.Open(); int result = cmd.ExecuteNonQuery(); return(result == 1); } }
public static Mem_EducationalInfo GetMem_EducationalInfoByID(int id) { Mem_EducationalInfo mem_EducationalInfo = new Mem_EducationalInfo(); SqlMem_EducationalInfoProvider sqlMem_EducationalInfoProvider = new SqlMem_EducationalInfoProvider(); mem_EducationalInfo = sqlMem_EducationalInfoProvider.GetMem_EducationalInfoByID(id); return(mem_EducationalInfo); }
public static bool UpdateMem_Applied_EducationalInfo(Mem_EducationalInfo mem_EducationalInfo) { SqlMem_EducationalInfoProvider sqlMem_EducationalInfoProvider = new SqlMem_EducationalInfoProvider(); return(sqlMem_EducationalInfoProvider.UpdateMem_Applied_EducationalInfo(mem_EducationalInfo)); }
public static int InsertMem_Applied_EducationalInfo(Mem_EducationalInfo mem_EducationalInfo) { SqlMem_EducationalInfoProvider sqlMem_EducationalInfoProvider = new SqlMem_EducationalInfoProvider(); return(sqlMem_EducationalInfoProvider.InsertMem_Applied_EducationalInfo(mem_EducationalInfo)); }