public DataTable GetAll()
 {
     try
     {
         InstituteDAL instituteDAL = new InstituteDAL();
         return(instituteDAL.GetAll());
     }
     catch (Exception)
     {
         throw;
     }
 }
 public bool Delete(Institutes institute)
 {
     try
     {
         InstituteDAL instituteDAL = new InstituteDAL();
         return(instituteDAL.Delete(institute));
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #3
0
        public Boolean Delete(SqlInt32 InstituteID)
        {
            InstituteDAL dalInstitute = new InstituteDAL();

            if (dalInstitute.Delete(InstituteID))
            {
                return(true);
            }
            else
            {
                Message = dalInstitute.Message;
                return(false);
            }
        }
예제 #4
0
        public Boolean Update(InstituteENT entInstitute)
        {
            InstituteDAL dalInstitute = new InstituteDAL();

            if (dalInstitute.Update(entInstitute))
            {
                return(true);
            }
            else
            {
                Message = dalInstitute.Message;
                return(false);
            }
        }
예제 #5
0
        public MainWindow()
        {
            InitializeComponent();

            //this.InitializeComponent();
            //CoreWindow.GetForCurrentThread().KeyDown += MyPage_KeyDown;



            instituteDAL = new InstituteDAL();
            studentDAL   = new StudentDAL();
            miscDAL      = new MiscDAL();
            rfidDAL      = new RfidDAL();

            ReadDatabaseFile();

            try
            {
                if (DateTime.Now.Hour > 10)
                {
                    btnInOut.Content = "OUT";
                }
                else
                {
                    btnInOut.Content = "IN";
                }

                institue         = instituteDAL.GetInstitute();
                this.DataContext = institue;
                date_TB.Text     = DateTime.Now.ToString("dd-MMMM-yyy");
                AllStudentList   = studentDAL.get_all_admissions();
                absentAllStudents();

                m_SMSEngine = new SMSEngine(ConnectionString.con_string);

                StartRefreshTimer();
            }
            catch (Exception ex)
            {
                //Debug.WriteLine(ex);
                msgGRID.Visibility = Visibility.Visible;
                msgTB.Text         = ex.ToString();
            }
        }
        public bool Save(Institutes institute)
        {
            try
            {
                InstituteDAL instituteDAL = new InstituteDAL();

                if (IsNameExist(institute))
                {
                    throw new Exception("Name already exist.");
                }
                else
                {
                    return(instituteDAL.Save(institute));
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #7
0
        public MainWindow()
        {
            InitializeComponent();

            try
            {
                ReadDatabaseFile();
                insDAL = new InstituteDAL();
                empDAL = new EmployeeDAL();

                digital_clock();
                TabControlMain.SelectedIndex = 0;
                ins = insDAL.get_sms_institute();
                institute_grid.DataContext = ins;
                image_grid.DataContext     = ins;
            }
            catch (Exception ex)
            {
                error_grid.Visibility  = Visibility.Visible;
                error_grid.DataContext = ex.Message;
                isInitialized          = false;
            }
        }
예제 #8
0
        public InstituteENT SelectByPK(SqlInt32 InstituteID)
        {
            InstituteDAL dalInstitute = new InstituteDAL();

            return(dalInstitute.SelectByPK(InstituteID));
        }
예제 #9
0
        public DataTable SelectForDropDownList()
        {
            InstituteDAL dalInstitute = new InstituteDAL();

            return(dalInstitute.SelectForDropDownList());
        }
예제 #10
0
        public DataTable SelectAll()
        {
            InstituteDAL dalInstitute = new InstituteDAL();

            return(dalInstitute.SelectAll());
        }