public string Registration(RegistrationBO objRegistrationBO) { try { RegistrationDA objRegistrationDA = new RegistrationDA(); DataTable dtdetails = new DataTable(); dtdetails = objRegistrationDA.Registration(objRegistrationBO); if (dtdetails.Rows.Count > 0) { if (Convert.ToString(dtdetails.Rows[0]["Status"]) == "1") { SendMail(objRegistrationBO.Email, objRegistrationBO.UserName, Convert.ToString(dtdetails.Rows[0]["TranPass"]), Convert.ToString(dtdetails.Rows[0]["tradPass"]), Convert.ToString(dtdetails.Rows[0]["InvPassword"])); return("1"); } else { return(Convert.ToString(dtdetails.Rows[0]["Status"])); } } else { return(Convert.ToString(dtdetails.Rows[0]["Status"])); } } finally { } }
public List <CountryBO> GetCountry() { List <CountryBO> listCountryBO = new List <CountryBO>(); DataTable dtCountry = new DataTable(); RegistrationDA objRegistrationDA = new RegistrationDA(); dtCountry = objRegistrationDA.GetCountry(); if (dtCountry.Rows.Count > 0) { for (int index = 0; index < dtCountry.Rows.Count; index++) { CountryBO objCountryBO = new CountryBO(); objCountryBO.Id = Convert.ToInt32(dtCountry.Rows[index]["id"]); objCountryBO.Name = Convert.ToString(dtCountry.Rows[index]["Name"]); objCountryBO.Code = Convert.ToString(dtCountry.Rows[index]["Code"]); listCountryBO.Add(objCountryBO); } return(listCountryBO); } else { listCountryBO = null; return(listCountryBO); } }