예제 #1
0
        private void loadEmployeeData()
        {
            String value = "" + lookUpEditEmployee.EditValue;
            int    idEmp = 0;

            int.TryParse(value, out idEmp);
            if (idEmp > 0)
            {
                ConnectionEntities obj = new ConnectionEntities();
            }
            btnAddMoreDepartment.Enabled = false;
            lookUpEditDepartment.Enabled = false;
            enableField();
        }
예제 #2
0
        /// <summary>
        /// Author          Date        Comment
        /// BONGVX                      sua thong tin user
        /// </summary>
        private int updateUser()
        {
            try
            {
                ConnectionEntities obj = new ConnectionEntities();

                return(1);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.StackTrace, ex.Message);
                return(0);
            }
        }
예제 #3
0
        /// <summary>
        /// GIPO: Obtem connectionString a partir do DomínioGipo
        /// </summary>
        public string GetConnectionStringByDomainGipo(string DomainGipo)
        {
            ConnectionEntities connection = new ConnectionEntities();

            IEnumerable <conConnection> queryConnection = from c in connection.conConnections
                                                          where c.DomainGipo.Contains(DomainGipo)
                                                          select c;

            conConnection connectionCurrent = queryConnection.FirstOrDefault();

            if (connectionCurrent == null)
            {
                throw new SystemException("Erro C001 - Não existe conexão para o domínio solicitado. Verifique a URL digitada.");
            }

            return(connectionCurrent.ConnectionString);
        }
예제 #4
0
        public List <StudentObject> GetOffline()
        {
            List <StudentObject>     listStudentOffline = new List <StudentObject>();
            ConnectionEntities       objConEn           = new ConnectionEntities();
            eTrainingOfflineEntities objConnEntitiesOff = objConEn.getTrainingCenterOff();


            var listTempOffline = objConnEntitiesOff.SP_Student_GetOfflineStudentFromLast3days();

            foreach (var item in listTempOffline)
            {
                StudentObject objS = new StudentObject(item.Id, item.FirstName,
                                                       item.LastName, item.FullName, item.Sex, item.DateBirthday,
                                                       item.Mobile, item.Email, item.Address, item.DateCreate,
                                                       item.DateLastUpdate, item.Description, item.CourseId,
                                                       item.StatusId, item.UserId);
                listStudentOffline.Add(objS);
            }
            return(listStudentOffline);
        }
예제 #5
0
        public List <StudentObject> GetListFromWebIMIC()
        {
            List <StudentObject> listStudentFromWeb = new List <StudentObject>();
            ConnectionEntities   objConEn           = new ConnectionEntities();

            WEBIMICDBEntities objStudenWeb = objConEn.getWebImic();
            var listTempOffline            = objStudenWeb.WEB_IMIC_SP_RegisterDetail_GetForEtraining();

            foreach (var item in listTempOffline)
            {
                string[] Chuoi_Tach = item.FullName.Split(' ');
                string   FirstName  = Chuoi_Tach[Chuoi_Tach.Length - 1];
                string   LastName   = "";
                bool     flag       = true;
                for (int i = 0; i < Chuoi_Tach.Length - 1; i++)
                {
                    if (flag)
                    {
                        LastName += Chuoi_Tach[i];
                        flag      = false;
                    }
                    else
                    {
                        LastName += " " + Chuoi_Tach[i];
                    }
                }
                string        Description = "[From Web]" + item.Message;
                int           id          = 0;
                StudentObject objS        = new StudentObject(id, FirstName,
                                                              LastName, item.FullName, 0, item.CreatedTime,
                                                              item.Phone, item.Email, item.Address, item.CreatedTime,
                                                              item.CreatedTime, Description, 41,
                                                              1, 1);
                listStudentFromWeb.Add(objS);
                objStudenWeb.WEB_IMIC_SP_RegisterDetail_UpdateIsSeen(item.RegisterDetailId);
            }
            return(listStudentFromWeb);
        }