コード例 #1
0
        private Task AddPortalUserWithLocationId(PortalUserAndLocationId portalUser, IDbConnection _iAgentDevDb)
        {
            IAsyncRepository <PortalUserAndLocationId> portalUserRepo = new PortalUserDataRepo(_iAgentDevDb);

            try
            {
                return(portalUserRepo.AddAsync(portalUser));
            }
            catch (SqlException)
            {
                throw;
            }
        }
コード例 #2
0
        private PortalUserAndLocationId BuildPortalUserData()
        {
            var portalUserData = new PortalUserAndLocationId()
            {
                Portal_Id   = int.Parse(ddlPortalId.Text),
                Username    = txtUsername.Text.EncryptStringBase64(),
                Password    = txtPassword.Text.EncryptStringBase64(),
                DateExpired = DateTime.MinValue,
                IsEnabled   = true,
                IsExpired   = false,
                Location_Id = int.Parse(txtLocationId.Text)
            };

            if (int.Parse(ddlPortalId.Text).Equals(3) || int.Parse(ddlPortalId.Text).Equals(12))
            {
                portalUserData.AllowsConcurrent = false;
            }
            else
            {
                portalUserData.AllowsConcurrent = true;
            }
            return(portalUserData);
        }
コード例 #3
0
 public Task UpdateAsync(PortalUserAndLocationId entity)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public Task <IEnumerable <PortalUserAndLocationId> > Find(PortalUserAndLocationId obj)
 {
     throw new NotImplementedException();
 }