public async Task <JsonResult> GetEmployeeOwners([FromHeader] string Authorization) { string token = Authorization.Split(' ')[1]; var user = (from bb in _context.Auths join aa in _context.Tokens on bb.id equals aa.user_id join cc in _context.Accounts on bb.id equals cc.id_user where aa.access == token select cc).FirstOrDefault(); var staffs = await _context.EmployeeOwners.Where(x => x.id_owner == user.id).ToListAsync(); List <SendEmployee> send = new List <SendEmployee>(); foreach (var a in staffs) { var b = new SendEmployee(a); var auth = await _context.Auths.FindAsync(a.id_user); b.lastvisit = auth.last_visit; b.role = auth.role; send.Add(b); } return(new JsonResult(_responce.Return_Responce(System.Net.HttpStatusCode.OK, send, null))); }
private void textBoxUITypeEditor2_Click(object sender, EventArgs e) { senderEmployee = InputEmployee2; SelectEmployee se = new SelectEmployee(); se.Tag = 2; se.ShowDialog(); }
private void textBoxUITypeEditor4_MouseClick(object sender, MouseEventArgs e) { E_Sender = SetEmployee4; SelectEmployee se = new SelectEmployee(); se.Tag = 1; se.ShowDialog(); }