public AppointmentController(IAppontmentService appontmentService, IHttpContextAccessor httpContextAccessor)
        {
            _appontmentService = appontmentService;

            _httpContextaccessor = httpContextAccessor;
            //  _unitOfWork = unitOfWork;
            SessionUser = JsonConvert.DeserializeObject <CaltUsers>(_httpContextaccessor.HttpContext.Session.GetString("Userdetail"));
        }
        private string GetPrimeIdName(CaltUsers user)
        {
            // string strConnectionString = "Server=tcp:192.168.1.3\\mssqlserver,50841;Database=CALT" + clinetId + "; User ID=sa; Password=r4199357!;MultipleActiveResultSets=true";
            string strConnectionStringFix = @"Server=tcp:23.97.186.48\\mssqlserver,50841;Database=CALT" + user.ClientID.Trim() + "; User ID=sa; Password=r4199357!;MultipleActiveResultSets=true";
            string strConnectionString    = String.IsNullOrEmpty(user.ConnectionString) == true ? strConnectionStringFix : user.ConnectionString;
            var    idName = "";

            using (SqlConnection con = new SqlConnection(strConnectionString))
            {
                if (con.State == ConnectionState.Closed)
                {
                    con.Open();
                }

                var        query = "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = 'TASKS' ";
                SqlCommand cmd   = new SqlCommand(query, con);
                idName = cmd.ExecuteScalar().ToString();
            }

            //  string query = "update UserSettings set Resoucresgroup='" + value + "' where UserID=" + id;
            return(idName);
        }
 public AppontmentService(IUnitOfWork unitOfWork, IHttpContextAccessor httpContextAccessor)
 {
     _httpContextaccessor = httpContextAccessor;
     _unitOfWork          = unitOfWork;
     SessionUser          = JsonConvert.DeserializeObject <CaltUsers>(_httpContextaccessor.HttpContext.Session.GetString("Userdetail"));
 }
Exemplo n.º 4
0
 public void UpdateInfo(int id, CaltUsers entity)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 public void Insert(CaltUsers entity)
 {
     throw new NotImplementedException();
 }