public string GetEmailByUserID(string userId) { db_helper db = new db_helper(db_helper.ConnectionStr.vAppUsersConnStr); object email = db.ExecuteScalar("Select Email From [Vantage_App_Users].[dbo].[AspNetUsers] Where [Id] = '" + userId + "'", System.Data.CommandType.Text); if (email != null) { return(email.ToString().Trim()); } else { return(""); } }
public int GetNextIssueID() { db_helper db = new db_helper(db_helper.ConnectionStr.HelpdeskConnStr); object issueid = db.ExecuteScalar("Select max(id) + 1 From t_issue", System.Data.CommandType.Text); if (issueid != null) { return(Convert.ToInt32(issueid)); } else { return(1); } }