コード例 #1
0
        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
            {
            }
        }
コード例 #2
0
        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);
            }
        }