Пример #1
0
        void Save()
        {
            if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToSave, "Year level") == DialogResult.Yes)
            {
                if (!string.IsNullOrWhiteSpace(txtYearLevel.Text))
                {
                    using (Maintenance _maintain = new Maintenance())
                    {
                        T_YearLevel value = new T_YearLevel();
                        value.ID        = isAdd ? 0 : Convert.ToInt64(dgYearLevel.SelectedRows[0].Cells[0].Value.ToString());
                        value.YearLevel = txtYearLevel.Text;
                        value.Active    = cbActive.Checked;
                        value.Count     = Convert.ToInt32(txtCount.Value);
                        _maintain.Save(value, ref MsgReturned);

                        SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Year level");
                        SystemProperties.Cleared(this, false, true, true);
                    }
                }
                else
                {
                    SystemProperties.ShowMessage.MessageError(SystemProperties.MessageNotification.CheckInput + Environment.NewLine + Environment.NewLine + "Year level", "Year level");
                }
            }
            LoadYearLevel();
        }
 void btnCancel_Click(object sender, EventArgs e)
 {
     GetUser();
     SystemProperties.Cleared(this, false, true, true);
     txtJobTitle.ReadOnly = true;
     lblMessage.Text      = "";
 }
Пример #3
0
        void dgRoom_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            SystemProperties.Cleared(this, false, true, true);

            if (dgRoom.Rows.Count > 0)
            {
                using (Maintenance _maintain = new Maintenance())
                {
                    var value = _maintain.GetRoom().Where(x => x.ID == Convert.ToInt64(dgRoom.SelectedRows[0].Cells[0].Value)).FirstOrDefault();
                    if (value != null)
                    {
                        cmbRoomType.Text        = value.RoomType;
                        txtRoomCode.Text        = value.RoomCode;
                        txtDescription.Text     = value.Description;
                        cmbBuildingCode.Text    = value.BuildingCode;
                        txtLocationAddress.Text = _maintain.GetBuildingCode().Where(x => x.BuildingCode == value.BuildingCode).FirstOrDefault().BuildingName;
                        txtCapacity.Value       = value.Capacity.Value;
                        cbActive.Checked        = value.Active.Value;
                        LoadTime(value.RoomCode);
                        btnDelete = SystemProperties.BtnProperties(btnDelete, true, Imagename.Delete.ToString(), Imagename._delete.ToString());
                        btnEdit   = SystemProperties.BtnProperties(btnEdit, true, Imagename.Edit.ToString(), Imagename._edit.ToString());
                        GetRoomDevice(value.RoomCode);
                    }
                }
            }
        }
 void Save()
 {
     if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToSave, "Student registration") == DialogResult.Yes)
     {
         if (CheckEmpty())
         {
             if (CheckRFIDNo())
             {
                 using (Students _std = new Students())
                 {
                     _std.Save(SetupStudentInfo(false), ref MsgReturned);
                     SaveImage(true);
                 }
                 using (Parents parent = new Parents())
                 {
                     parent.Save(SetupParentInfo(false));
                 }
                 SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Student registration");
                 SystemProperties.Cleared(this, false, true, true);
                 SystemProperties.Cleared(Mother, false, true, true);
                 SystemProperties.Cleared(Father, false, true, true);
                 LoadStudentInfo();
             }
             else
             {
                 SystemProperties.ShowMessage.MessageError(SystemProperties.MessageNotification.ExistRFID, "Student registration");
             }
         }
         else
         {
             SystemProperties.ShowMessage.MessageError(SystemProperties.MessageNotification.CheckInput + Environment.NewLine + Environment.NewLine + "Student ID" + Environment.NewLine + "Student Last Name" + Environment.NewLine + "Student First Name" + Environment.NewLine + "Student RFID No." + Environment.NewLine + Environment.NewLine + "Mother Last Name, First Name, Contact No" + Environment.NewLine + "Father Last Name, First Name, Contact No", "Student registration");
         }
     }
 }
Пример #5
0
 void Save()
 {
     if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToSave, "Time duration") == DialogResult.Yes)
     {
         if (!string.IsNullOrWhiteSpace(txtCode.Text))
         {
             using (Maintenance _maintain = new Maintenance())
             {
                 T_Time value = new T_Time();
                 value.ID        = isAdd ? 0 : Convert.ToInt64(dgTime.SelectedRows[0].Cells[0].Value.ToString());
                 value.TimeStart = Convert.ToDateTime(dtStart.Value.ToString());
                 value.TimeEnd   = Convert.ToDateTime(dtEnd.Value.ToString());
                 value.TimeCode  = txtCode.Text;
                 value.Active    = cbActive.Checked;
                 _maintain.Save(value, ref MsgReturned);
                 LoadTime();
                 SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Time duration");
                 SystemProperties.Cleared(this, false, true, true);
             }
         }
         else
         {
             SystemProperties.ShowMessage.MessageError(string.Format("{0}" + Environment.NewLine + Environment.NewLine + "Code", SystemProperties.MessageNotification.CheckInput), "Time duration");
         }
     }
 }
Пример #6
0
 void SetProperties()
 {
     LoadInstructor();
     ObjEnable(false);
     SystemProperties.Cleared(this, false, true, true);
     txtSearch.ReadOnly = false;
 }
        void Save()
        {
            if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToSave, "Branch building") == DialogResult.Yes)
            {
                if (!string.IsNullOrWhiteSpace(txtBranch.Text) && !string.IsNullOrWhiteSpace(txtBuildingCode.Text) && !string.IsNullOrWhiteSpace(txtName.Text))
                {
                    using (Maintenance _maintain = new Maintenance())
                    {
                        T_BranchBuilding value = new T_BranchBuilding();
                        value.ID           = isAdd ? 0 : Convert.ToInt64(dgBuilding.SelectedRows[0].Cells[0].Value.ToString());
                        value.Branch       = txtBranch.Text;
                        value.Active       = cbActive.Checked;
                        value.BuildingCode = txtBuildingCode.Text;
                        value.BuildingName = txtName.Text;
                        _maintain.Save(value, ref MsgReturned);

                        SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Branch building");
                        SystemProperties.Cleared(this, false, true, true);
                    }
                }
                else
                {
                    SystemProperties.ShowMessage.MessageError(SystemProperties.MessageNotification.CheckInput + Environment.NewLine + Environment.NewLine + "Branch" + Environment.NewLine + "Code" + Environment.NewLine + "Name", "Branch building");
                }
            }
            LoadBuiding();
        }
 void SetProperties()
 {
     LoadSemester();
     ObjEnable(false);
     GetYearClass();
     SystemProperties.Cleared(this, false, true, true);
 }
Пример #9
0
 void btnEdit_Click(object sender, EventArgs e)
 {
     ObjEnable(true);
     isAdd = false;
     SystemProperties.Cleared(this, true, false, false);
     MsgReturned = "";
 }
Пример #10
0
 void btnCancel_Click(object sender, EventArgs e)
 {
     loadRoom();
     LoadTime();
     SystemProperties.Cleared(this, false, true, true);
     MsgReturned = "";
 }
Пример #11
0
        void Save()
        {
            if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToSave, "Device Config") == DialogResult.Yes)
            {
                if (CheckSerialPort())
                {
                    if (!string.IsNullOrWhiteSpace(txtName.Text) && !string.IsNullOrWhiteSpace(txtComPort.Text) && !string.IsNullOrWhiteSpace(txtBaundRate.Text) && !string.IsNullOrWhiteSpace(txtDataBits.Text) && !string.IsNullOrWhiteSpace(cmbParity.Text) && !string.IsNullOrWhiteSpace(cmbStopBits.Text))
                    {
                        using (DeviceModule device = new DeviceModule())
                        {
                            device.Save(SetDeviceConfig(false), ref MsgReturned);

                            SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Device Config");
                            SystemProperties.Cleared(this, false, true, true);
                        }
                    }
                    else
                    {
                        SystemProperties.ShowMessage.MessageError(SystemProperties.MessageNotification.CheckInput + Environment.NewLine + Environment.NewLine + "Devie Name" + Environment.NewLine + "Port" + Environment.NewLine + "Baund Rate" + Environment.NewLine + "Data Bits" + Environment.NewLine + "Stop Bits" + Environment.NewLine + "Parity", "Device Config");
                    }
                }
                else
                {
                    SystemProperties.ShowMessage.MessageError("Device Serial port is already exists  " + Environment.NewLine + "Serial port:  " + txtComPort.Text, "Device Config");
                }
            }
            LoadDevice();
        }
Пример #12
0
 void SetProperties()
 {
     ObjEnable(false);
     LoadCourseProgram();
     LoadYearLevel();
     SystemProperties.Cleared(this, false, true, true);
     txtFromTo.ReadOnly = true;
 }
Пример #13
0
 void btnAdd_Click(object sender, EventArgs e)
 {
     ObjEnable(true);
     btnDelete = SystemProperties.BtnProperties(btnDelete, false, Imagename.Delete.ToString(), Imagename._delete.ToString());
     isAdd     = true;
     SystemProperties.Cleared(this, true, true, true);
     MsgReturned = "";
 }
 void btnEdit_Click(object sender, EventArgs e)
 {
     ObjEnable(true);
     isAdd = false;
     SystemProperties.Cleared(this, true, false, false);
     txtJobTitle.ReadOnly = true;
     lblMessage.Text      = "";
 }
 void btnAdd_Click(object sender, EventArgs e)
 {
     ObjEnable(true);
     btnDelete = SystemProperties.BtnProperties(btnDelete, false, Imagename.Delete.ToString(), Imagename._delete.ToString());
     isAdd     = true;
     SystemProperties.Cleared(this, true, true, true);
     txtJobTitle.ReadOnly = true;
     lblMessage.Text      = "";
 }
Пример #16
0
 void SetProperties()
 {
     ObjEnable(false);
     loadRoom();
     LoadTime();
     LoadType();
     GetBuildingCode();
     SystemProperties.Cleared(this, false, true, true);
     pnlDevice.Hide();
 }
 void btnDelete_Click(object sender, EventArgs e)
 {
     ObjEnable(false);
     Delete();
     MsgReturned = "";
     SystemProperties.Cleared(this, false, true, true);
     SystemProperties.Cleared(Mother, false, true, true);
     SystemProperties.Cleared(Father, false, true, true);
     txtSearch.ReadOnly = false;
 }
Пример #18
0
 void btnEdit_Click(object sender, EventArgs e)
 {
     ObjEnable(true);
     isAdd = false;
     SystemProperties.Cleared(this, true, false, false);
     MsgReturned = "";
     //dgRoom.Enabled = true;
     dgTime.Enabled = true;
     txtDeviceDescription.ReadOnly = true;
     dgDeviceRecord.Enabled        = true;
 }
        void btnCancel_Click(object sender, EventArgs e)
        {
            LoadStudentInfo();
            SystemProperties.Cleared(this, false, true, true);
            SystemProperties.Cleared(Mother, false, true, true);
            SystemProperties.Cleared(Father, false, true, true);

            MsgReturned = "";

            txtSearch.ReadOnly = false;
        }
 void btnEdit_Click(object sender, EventArgs e)
 {
     ObjEnable(true);
     isAdd = false;
     SystemProperties.Cleared(this, true, false, false);
     SystemProperties.Cleared(Mother, true, false, false);
     SystemProperties.Cleared(Father, true, false, false);
     MsgReturned = "";
     AutoScanTimer.Start();
     txtSearch.ReadOnly = false;
 }
 void btnAdd_Click(object sender, EventArgs e)
 {
     ObjEnable(true);
     btnDelete = SystemProperties.BtnProperties(btnDelete, false, Imagename.Delete.ToString(), Imagename._delete.ToString());
     isAdd     = true;
     SystemProperties.Cleared(this, true, true, true);
     SystemProperties.Cleared(Mother, true, true, true);
     SystemProperties.Cleared(Father, true, true, true);
     MsgReturned = "";
     AutoScanTimer.Start();
     txtSearch.ReadOnly = false;
 }
 void btnAdd_Click(object sender, EventArgs e)
 {
     ObjEnable(true);
     isAdd = true;
     SystemProperties.Cleared(this, true, true, true);
     dgDay.Enabled = dgTime.Enabled = dgStudentList.Enabled = true;
     GetDayAndTime();
     GetRoomSubjectMessage();
     MsgReturned             = "";
     txtRoomDesc.ReadOnly    = true;
     txtSubjectDesc.ReadOnly = true;
 }
        void SetProperties()
        {
            GetDayAndTime();
            GetRoomSubjectMessage();
            LoadStudent();
            ObjEnable(false);
            SystemProperties.Cleared(this, false, true, true);
            dgDay.Enabled = dgTime.Enabled = dgStudentList.Enabled = false;

            txtRoomDesc.ReadOnly    = true;
            txtSubjectDesc.ReadOnly = true;
        }
Пример #24
0
 void btnDelete_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrWhiteSpace(txtRoomCode.Text) && !string.IsNullOrWhiteSpace(txtRoomCode.Text) && !string.IsNullOrWhiteSpace(txtDescription.Text))
     {
         Delete();
     }
     else
     {
         SystemProperties.ShowMessage.MessageError("Empty text field", "Subject");
     }
     MsgReturned = "";
     SystemProperties.Cleared(this, false, true, true);
 }
 void btnCancel_Click(object sender, EventArgs e)
 {
     //LoadYearLevel();
     ObjEnable(false);
     SystemProperties.Cleared(this, false, true, true);
     dgDay.Enabled = dgTime.Enabled = dgStudentList.Enabled = false;
     GetDayAndTime();
     GetRoomSubjectMessage();
     MsgReturned          = "";
     txtRoomDesc.ReadOnly = true;
     LoadStudent();
     txtSubjectDesc.ReadOnly = true;
 }
Пример #26
0
 void btnAdd_Click(object sender, EventArgs e)
 {
     ObjEnable(true);
     btnDelete = SystemProperties.BtnProperties(btnDelete, false, Imagename.Delete.ToString(), Imagename._delete.ToString());
     isAdd     = true;
     SystemProperties.Cleared(this, true, true, true);
     MsgReturned = "";
     //dgRoom.Enabled = true;
     dgTime.Enabled = true;
     LoadTime();
     txtDeviceDescription.ReadOnly = true;
     dgDeviceRecord.Enabled        = true;
 }
Пример #27
0
 void btnDelete_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrWhiteSpace(txtCode.Text) && !string.IsNullOrWhiteSpace(txtFromTo.Text) && !string.IsNullOrWhiteSpace(txtCourse.Text))
     {
         Delete();
     }
     else
     {
         SystemProperties.ShowMessage.MessageError("Empty record", "Course / progra");
     }
     MsgReturned = "";
     SystemProperties.Cleared(this, false, true, true);
 }
        void SetProperties()
        {
            LoadApplication();
            LoadCourse();
            LoadYearLevel();
            LoadCivilStatus();
            LoadStudentInfo();

            ObjEnable(false);
            SystemProperties.Cleared(this, false, true, true);
            SystemProperties.Cleared(Mother, false, true, true);
            SystemProperties.Cleared(Father, false, true, true);
            txtSearch.ReadOnly    = false;
            AutoScanTimer.Enabled = true;
            AutoScanTimer.Start();
        }
 void Save()
 {
     if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToSave, "Year class") == DialogResult.Yes)
     {
         if (CheckEmptyField())
         {
             using (Maintenance _maintain = new Maintenance())
             {
                 _maintain.Save(SetSemester(), ref MsgReturned);
                 SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Year class");
                 SystemProperties.Cleared(this, false, true, true);
                 GetYearClass();
             }
         }
         else
         {
             SystemProperties.ShowMessage.MessageError(SystemProperties.MessageNotification.CheckInput + Environment.NewLine + Environment.NewLine + "Semester" + Environment.NewLine + "Year class", "Year class");
         }
     }
 }
Пример #30
0
 void Save()
 {
     if (SystemProperties.ShowMessage.MessageQuestion(SystemProperties.MessageNotification.YouWantToSave, "Civil status") == DialogResult.Yes)
     {
         if (!string.IsNullOrWhiteSpace(txtCivilStatus.Text))
         {
             using (Maintenance _maintain = new Maintenance())
             {
                 _maintain.Save(SetCivilStatus(), ref MsgReturned);
                 SystemProperties.ShowMessage.MessageInformation(MsgReturned, "Civil status");
                 SystemProperties.Cleared(this, false, true, true);
                 GetCivilStatus();
             }
         }
         else
         {
             SystemProperties.ShowMessage.MessageError(SystemProperties.MessageNotification.CheckInput + Environment.NewLine + Environment.NewLine + "Civil status", "Civil status");
         }
     }
 }