private void GetTableGroup() { dataGridViewGroup.Rows.Clear(); dataGridViewGroup.Refresh(); string order = "ASC"; List <KeyValuePair <string, string> > condition = new List <KeyValuePair <string, string> >(); condition.Add(new KeyValuePair <string, string>("NmMGroup", "ASC")); MySqlDataReader dataReader = GDBMGroup.GetTable(condition); while (dataReader.Read()) { dataGridViewGroup.Rows.Add( dataReader.GetInt16("IdMKaryawan").ToString(), dataReader.GetInt16("No").ToString(), dataReader.GetString("KdMKaryawan"), dataReader.GetString("NmMKaryawan"), dataReader.GetInt16("IdMJabatan").ToString(), dataReader.GetString("NmMJabatan"), dataReader.GetString("Alamat"), dataReader.GetString("NoHP"), ASPCast.IntToBool(dataReader.GetInt16("Aktif")) ); } GDBMKaryawan.aspQuery.MySqlConnect.CloseConnection(); }
public void CopyToObject(ref ASPMKaryawan_DO MKaryawan, MySqlDataReader data) { try { if (data.Read()) { MKaryawan.IdMKaryawan = data.GetInt16("IdMKaryawan"); MKaryawan.KdMKaryawan = data.GetString("KdMKaryawan"); MKaryawan.NmMKaryawan = data.GetString("NmMKaryawan"); MKaryawan.Alamat = data.GetString("Alamat"); MKaryawan.NoHP = data.GetString("NoHP"); MKaryawan.IdMJabatan = data.GetInt16("IdMJabatan"); MKaryawan.Aktif = ASPCast.IntToBool(data.GetInt16("Aktif")); MKaryawan.IdMUserCreate = data.GetInt16("IdMUserCreate"); MKaryawan.TglCreate = data.GetMySqlDateTime("TglCreate"); MKaryawan.IdMUserUpdate = data.GetInt16("IdMUserUpdate"); MKaryawan.TglUpdate = data.GetMySqlDateTime("TglUpdate"); MKaryawan.Hapus = ASPCast.IntToBool(data.GetInt16("Hapus")); } } catch (MySqlException ex) { ASPMsgCmp.WarningMessage(ex.Message); } }
private void GetTable() { dataGridView.Rows.Clear(); dataGridView.Refresh(); MySqlDataReader dataReader = GDBMJabatan.GetTable(GetCondition()); while (dataReader.Read()) { dataGridView.Rows.Add( dataReader.GetInt16("IdMJabatan").ToString(), dataReader.GetInt16("No").ToString(), dataReader.GetString("KdMJabatan"), dataReader.GetString("NmMJabatan"), ASPCast.IntToBool(dataReader.GetInt16("Aktif")) ); } GDBMJabatan.aspQuery.MySqlConnect.CloseConnection(); }
public void CopyToObject(ref ASPMGroup_DO MGroup, MySqlDataReader data) { try { if (data.Read()) { MGroup.IdMGroup = data.GetInt16("IdMGroup"); MGroup.KdMGroup = data.GetString("KdMGroup"); MGroup.NmMGroup = data.GetString("NmMGroup"); MGroup.IdMManager = data.GetInt16("IdMManager"); MGroup.Aktif = ASPCast.IntToBool(data.GetInt16("Aktif")); MGroup.IdMUserCreate = data.GetInt16("IdMUserCreate"); MGroup.TglCreate = data.GetMySqlDateTime("TglCreate"); MGroup.IdMUserUpdate = data.GetInt16("IdMUserUpdate"); MGroup.TglUpdate = data.GetMySqlDateTime("TglUpdate"); MGroup.Hapus = ASPCast.IntToBool(data.GetInt16("Hapus")); } } catch (MySqlException ex) { ASPMsgCmp.WarningMessage(ex.Message); } }
public void CopyToObject(ref ASPMUser_DO MUser, MySqlDataReader data) { try { if (data.Read()) { MUser.IdMUser = data.GetInt16("IdMUser"); MUser.Username = data.GetString("Username"); MUser.Password = data.GetString("Password"); MUser.IdMKaryawan = data.GetInt16("IdMKaryawan"); MUser.Aktif = ASPCast.IntToBool(data.GetInt16("Aktif")); MUser.IdMUserCreate = data.GetInt16("IdMUserCreate"); MUser.TglCreate = data.GetMySqlDateTime("TglCreate"); MUser.IdMUserUpdate = data.GetInt16("IdMUserUpdate"); MUser.TglUpdate = data.GetMySqlDateTime("TglUpdate"); MUser.Hapus = ASPCast.IntToBool(data.GetInt16("Hapus")); } } catch (MySqlException ex) { ASPMsgCmp.WarningMessage(ex.Message); } }