private bool IsOtherAgentHasEmail(string email) { AgentDS.AgentDSDataTable dt = BllProxyAgent.GetAgentByEmail(email); if (dt.Rows.Count != 0) { this.showErrorMessage("Agent with the same email already exists!"); return(true); } return(false); }
private UserDS.UserDSRow GetUser(string email) { AgentDS.AgentDSDataTable agentDT = BllProxyAgent.GetAgentByEmail(email); if (agentDT.Rows.Count != 0) { int userID = 0; int.TryParse(agentDT[0]["user_id"].ToString(), out userID); UserDS.UserDSDataTable userDT = BllProxyUser.SelectUser(userID); if (userDT.Rows.Count != 0) { return(userDT[0]); } } return(null); }