public BE_ResGenerico UpdChangePassword(BE_ReqSearhUsuario Request)
        {
            BE_ResGenerico Item = new BE_ResGenerico();
            long Resultado = 0;
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "usp_Upd_ChangePasswordPerUsuario";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cPerCodigo", Request.PerCodigo);
                        cm.Parameters.AddWithValue("cPerUsuClaveNew", Request.cPerUsuClave);
                        cm.Connection = cn;
                        Resultado = cm.ExecuteNonQuery();
                        Item.Resultado = Resultado;
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return Item;
        }
        public DataTable Get_SearhUsuario(BE_ReqSearhUsuario Request)
        {
            //string Item = "";

            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "usp_Get_PerUsuario";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cPerCodigo", Request.PerCodigo);
                        cm.Parameters.AddWithValue("cPerUsuClave", Request.cPerUsuClave);
                        cm.Connection = cn;

                        using (SqlDataReader dr = cm.ExecuteReader())
                            dt.Load(dr);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return dt;
        }
Esempio n. 3
0
 public BE_ResGenerico UpdChangePassword(BE_ReqSearhUsuario Request)
 {
     BE_ResGenerico Item = new BE_ResGenerico();
     DA_PerUsuario Obj = new DA_PerUsuario();
     Item = Obj.UpdChangePassword(Request);
     return Item;
 }
        public DataTable Get_CboListUsuario(BE_ReqSearhUsuario Request)
        {
            //string Item = "";
            //DataTable dt = new DataTable();
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "SELECT cPerCodigo , cPerUsuCodigo  FROM PerUsuario";
                        cm.CommandType = CommandType.Text;
                        cm.Connection = cn;

                        using (SqlDataReader dr = cm.ExecuteReader())
                            dt.Load(dr);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return dt;
        }
Esempio n. 5
0
 public DataTable Get_SearhUsuario(BE_ReqSearhUsuario  Request)
 {
     //Recuperando registros
     DataTable dt = new DataTable();
     DA_PerUsuario Obj = new DA_PerUsuario();
     return Obj.Get_SearhUsuario(Request);
 }