public void GetDirectMessageDetails(string userName, string password,string screenName,string FollowerCount,string FollowingCount) { try { int count = 0; clsDBQueryManager Db = new clsDBQueryManager(); DataSet ds = Db.InsertorUpdateUserDetailsForDirectMessaging("", "", "", userName, password); DataTable dt = ds.Tables["tb_AccountSendDirectMessage"]; if (dt==null) { //find count value; //string followercount = dt.Rows[0]["FollowerCount"].ToString(); //update Db.UpdateUserDetailsForDirectMessaging(Screen_name, FollowerCount, FollowingCount, userName, password); count = 0; } else { //select. string tempfollowercount = dt.Rows[0]["FollowerCount"].ToString(); Db.UpdateUserDetailsForDirectMessaging(Screen_name, FollowerCount, FollowingCount, userName, password); count = Convert.ToInt32(tempfollowercount) - Convert.ToInt32(FollowerCount); if (count > 0) { } } } catch (Exception ex) { Console.Write(ex.Message); } }