public MAYAVI_USERS_C GetMayaviUser(string UserID) { MAYAVI_USERS_C mayavi_users_details = new MAYAVI_USERS_C(); Query = @"SELECT UID,USER_NAME,EMAIL,MOBILENO,ORGANIZATION,PWD,PRIVILEGE FROM MAYAVI_USERS WHERE UID=@UID"; DataTable DataTable_MAYAVI_USERS = db.ExecuteSelect(Query, new MySqlParameter("@UID", UserID)); if (DataTable_MAYAVI_USERS.Rows.Count > 0) { foreach (DataRow item in DataTable_MAYAVI_USERS.Rows) { mayavi_users_details.UID = item["UID"].ToString(); mayavi_users_details.USER_NAME = item["USER_NAME"].ToString(); mayavi_users_details.EMAIL = item["EMAIL"].ToString(); mayavi_users_details.MOBILENO = item["MOBILENO"].ToString(); mayavi_users_details.ORGANIZATION = item["ORGANIZATION"].ToString(); mayavi_users_details.PWD = item["PWD"].ToString(); mayavi_users_details.PRIVILEGE = item["PRIVILEGE"].ToString(); } } return(mayavi_users_details); }