Ejemplo n.º 1
0
 public Task <eSWIS.Logic.UsrProfile.Container.USRPROFILE> Authenticate(string userName, string password = "")
 {
     eSWIS.Logic.UsrProfile.Container.USRPROFILE usrProfile = new eSWIS.Logic.UsrProfile.Container.USRPROFILE();
     try
     {
         string conn = _appConfiguration.GetConnectionString(PlexformConsts.ESWISConnectionString);
         eSWIS.Logic.UsrProfile.UsrProfile obj = new eSWIS.Logic.UsrProfile.UsrProfile(conn);
         usrProfile = obj.GetUserProfile(userName, password);
     }
     catch (Exception ex)
     {
         var temp = ex.ToString();
     }
     return(Task.FromResult(usrProfile));
 }
Ejemplo n.º 2
0
        public Task <bool> Insert(eSWIS.Logic.UsrProfile.Container.USRPROFILE cont)
        {
            var res = false;

            try
            {
                string conn = _appConfiguration.GetConnectionString(PlexformConsts.ESWISConnectionString);
                eSWIS.Logic.UsrProfile.UsrProfile obj = new eSWIS.Logic.UsrProfile.UsrProfile(conn);
                res = obj.Insert(cont);
            }
            catch (Exception ex)
            {
                var temp = ex.ToString();
            }
            return(Task.FromResult(res));
        }
Ejemplo n.º 3
0
        public Task <bool> Delete(string id)
        {
            var res = false;

            try
            {
                string conn = _appConfiguration.GetConnectionString(PlexformConsts.ESWISConnectionString);
                eSWIS.Logic.UsrProfile.UsrProfile obj = new eSWIS.Logic.UsrProfile.UsrProfile(conn);
                res = obj.Delete(id);
            }
            catch (Exception ex)
            {
                var temp = ex.ToString();
            }
            return(Task.FromResult(res));
        }
Ejemplo n.º 4
0
        public Task <IList <eSWIS.Logic.UsrProfile.Container.USRPROFILE> > GetAllUserProfileAsync(ref int totalRows, int skipCount = -1, int limit = -1, string orderby = "", string filter = "")
        {
            IList <eSWIS.Logic.UsrProfile.Container.USRPROFILE> res = new List <eSWIS.Logic.UsrProfile.Container.USRPROFILE>();

            try
            {
                string conn = _appConfiguration.GetConnectionString(PlexformConsts.ESWISConnectionString);
                eSWIS.Logic.UsrProfile.UsrProfile obj = new eSWIS.Logic.UsrProfile.UsrProfile(conn);
                res = obj.GetUserProfile(skipCount, limit, orderby, filter, ref totalRows);
                //res = new Tuple<int, IList<eSWIS.Logic.UsrProfile.Container.USRPROFILE>>(totalRows, list);
            }
            catch (Exception ex)
            {
                var temp = ex.ToString();
            }
            return(Task.FromResult(res));
        }