void ReleaseDesignerOutlets()
        {
            if (DateLabel != null)
            {
                DateLabel.Dispose();
                DateLabel = null;
            }

            if (DeleteBtn != null)
            {
                DeleteBtn.Dispose();
                DeleteBtn = null;
            }

            if (DoneBtn != null)
            {
                DoneBtn.Dispose();
                DoneBtn = null;
            }

            if (TextView != null)
            {
                TextView.Dispose();
                TextView = null;
            }
        }
Ejemplo n.º 2
0
        private void EmployeesBtn_Click(object sender, EventArgs e)
        {
            Key = 1;
            tableLayoutPanel3.Hide();
            tableLayoutPanel2.Hide();
            tableLayoutPanel1.Hide();
            SaveBtn.Hide();
            JobTitlesbtn.Enabled   = true;
            DepartmentsBtn.Enabled = true;
            OfficesBtn.Enabled     = true;
            SqldataGridView.Show();
            CreateBtn.Show();
            CreateBtn.Enabled = true;
            UpdateBtn.Show();
            UpdateBtn.Enabled = false;
            DeleteBtn.Show();
            DeleteBtn.Enabled = false;
            TurnOnEditBth.Show();
            MainPicture.Hide();
            string sql = "select p.id_pracownika as ID, p.imie as Imie, p.nazwisko as Nazwisko,  s.nazwa as Stanowisko, d.nazwa_dzialu as 'Nazwa działu', si.nazwa_siedziby as Siedziba, si.adres as Adres" +
                         " from PRACOWNICY p join DZIALY d on p.id_dzialu=d.id_dzialu join STANOWISKA s on p.id_stanowiska=s.id_stanowiska join SIEDZIBY si on d.id_siedziby=si.id_siedziby;";

            LoadDataToSqldataGridView("Pracownicy", sql);
            EmployeesBtn.Enabled = false;
        }
Ejemplo n.º 3
0
        public string DeleteAttendanceRecord(string employeeName, string date)
        {
            List <string> records;

            ViewAttendanceRecord(employeeName, date, out records);

            IList <IWebElement> tableRows = ResultTable.FindElements(By.TagName("tr"));

            foreach (var row in tableRows)
            {
                if (row.Text.Contains(employeeName) & row.Text.Contains(date))
                {
                    IWebElement checkBox = row.FindElement(By.Name("chkSelectRow[]"));

                    if (!checkBox.Selected)
                    {
                        checkBox.Click();

                        DeleteBtn.Click();

                        OkBtn.Click();

                        return("Success");
                    }
                }
            }

            return("No Record Found");
        }
Ejemplo n.º 4
0
 /// </summary>
 /// キーダウン押下時イベント
 /// ShiftKey押下でStart_Stop
 /// ControlKey押下でLap_Reset
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void HouseHold_KeyDown(object sender, KeyEventArgs e)
 {
     // Enter押下でFixボタン押下時イベント
     if (e.KeyCode == Keys.Enter)
     {
         FixBtn.PerformClick();
     }
     // Delete押下でDeleteボタン押下時イベント
     if (e.KeyCode == Keys.Delete)
     {
         DeleteBtn.PerformClick();
     }
     // Ctrl押下で支出⇔収入を切り替える。
     if (e.KeyCode == Keys.ControlKey)
     {
         if (budgetTglSw.Checked)
         {
             budgetTglSw.Checked = false;
         }
         else
         {
             budgetTglSw.Checked = true;
         }
     }
     // Escape押下でHouseHold_Closing
     if (e.KeyCode == Keys.Escape)
     {
         Close();
     }
 }
Ejemplo n.º 5
0
        public void DeleteTweet()
        {
            //Extended method which waits for TweetOptions button
            Collections.driver.WaitForElement(TweetOptions, 2);

            TweetOptions.Click();
            DeleteBtn.Click();
            FinalDeleteBtn.Click();
        }
Ejemplo n.º 6
0
 public MainPage()
 {
     InitializeComponent();
     dataGridView1.Hide();
     dataGridView2.Hide();
     AddBtn.Hide();
     DeleteBtn.Hide();
     ChangeBtn.Hide();
     label1.Hide();
     StatisticBox.Hide();
     ShowBtn.Hide();
 }
Ejemplo n.º 7
0
        private void Button_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            if (e.PropertyName != "IsSelectedMode")
            {
                return;
            }

            if (viewModel.IsSelectedMode)
            {
                DeleteBtn.FadeTo(1, 500, Easing.SpringIn);
            }
        }
Ejemplo n.º 8
0
 private void HideBtn_Click(object sender, EventArgs e)
 {
     refresh_method();
     dataGridView1.Hide();
     dataGridView2.Hide();
     AddBtn.Hide();
     DeleteBtn.Hide();
     ChangeBtn.Hide();
     label1.Hide();
     StatisticBox.Hide();
     ShowBtn.Hide();
 }
Ejemplo n.º 9
0
        public Form1()
        {
            InitializeComponent();
            SqldataGridView.Hide();
            tableLayoutPanel1.Hide();
            CreateBtn.Hide();
            UpdateBtn.Hide();
            UpdateBtn.Enabled = false;
            DeleteBtn.Hide();
            DeleteBtn.Enabled = false;
            TurnOnEditBth.Hide();
            TurnOffEditBth.Hide();
            SaveBtn.Hide();
            tableLayoutPanel2.Hide();
            tableLayoutPanel3.Hide();

            SqldataGridView.ReadOnly = false;
        }
Ejemplo n.º 10
0
 private void FormItems_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Control && e.KeyCode == Keys.N)
     {
         NewBtn.PerformClick();
     }
     else if (e.Control && e.KeyCode == Keys.S)
     {
         SaveBtn.PerformClick();
     }
     else if (e.Shift && e.KeyCode == Keys.Delete)
     {
         DeleteBtn.PerformClick();
     }
     else if (e.Control && e.KeyCode == Keys.F)
     {
         SearchTxt.Focus();
     }
 }
Ejemplo n.º 11
0
        /// <summary>
        /// Loads the window with all of the information of the teacher on the data table
        /// Not every option is accessible depending on which person is connected
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FacultyInformationsWindows_Load(object sender, EventArgs e)
        {
            if (status == "Admin")
            {
                ModifyBtn.Hide();
                LogOutBtn.Hide();
            }
            else
            {
                DeleteBtn.Hide();
            }
            classesPanel.Enabled = false;
            TeacherName.Text     = Teacher.firstName + " " + Teacher.name;
            teacherID.Text       = "ID : " + Teacher.ID.ToString();
            TeacherMail.Text     = "Mail : " + Teacher.mail;
            if (Teacher.phone == "0000000000")
            {
                TeacherPhone.Text = "Phone : Not yet entered";
            }
            else
            {
                TeacherPhone.Text = "Phone : " + Teacher.phone;
            }
            if (Teacher.address == "Address")
            {
                labelAdress.Text = "Address : Not yet entered";
            }
            else
            {
                labelAdress.Text = "Address : " + Teacher.address;
            }
            teacherPicture.ImageLocation = Teacher.profilePicture;



            for (int i = 0; i < Teacher.Classes.Count; i++)
            {
                for (int j = 0; j < Teacher.Classes[i].students.Count; j++)
                {
                    this.comboBoxStudent.Items.Add(Teacher.Classes[i].students[j].name.ToString() + " " + Teacher.Classes[i].students[j].firstName.ToString() + " " + Teacher.Classes[i].students[j].ID.ToString());
                }
            }
        }
Ejemplo n.º 12
0
        //Fill Aauthors Method End
        #endregion


        #region Author Update Method for Row
        //Author Update Method
        private void DgvAuthors_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            int id = Convert.ToInt32(DgvAuthors.Rows[e.RowIndex].Cells[0].Value.ToString());

            _author = _db.Authors.Find(id);

            UpdateBtn.Show();
            DeleteBtn.Show();

            TxtName.Text    = _author.Name;
            TxtSurname.Text = _author.Surname;
            if (_author.Status == false)
            {
                RdBtnActive.Checked = true;
            }
            else
            {
                RdBtnDisabled.Checked = true;
            }
            BtnCreate.Enabled = false;
        }
Ejemplo n.º 13
0
        private void DgvCustomer_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            int id = Convert.ToInt32(DgvCustomer.Rows[e.RowIndex].Cells[0].Value.ToString());

            _customer = _db.Customers.Find(id);

            UpdateBtn.Show();
            DeleteBtn.Show();

            FullNameTxt.Text = _customer.FullName;
            EmailTxt.Text    = _customer.Email;
            PhoneTxt.Text    = _customer.Phone;
            if (_customer.Status == false)
            {
                ActiveRdBtn.Checked = true;
            }
            else
            {
                DisabledRdBtn.Checked = true;
            }
            BtnCreate.Enabled = false;
        }
Ejemplo n.º 14
0
        private void JobTitlesbtn_Click(object sender, EventArgs e)
        {
            Key = 2;
            tableLayoutPanel3.Hide();
            tableLayoutPanel2.Hide();
            tableLayoutPanel1.Hide();
            SaveBtn.Hide();
            EmployeesBtn.Enabled   = true;
            OfficesBtn.Enabled     = true;
            DepartmentsBtn.Enabled = true;
            SqldataGridView.Show();
            CreateBtn.Show();
            UpdateBtn.Show();
            DeleteBtn.Show();
            CreateBtn.Enabled = true;
            UpdateBtn.Enabled = false;
            DeleteBtn.Enabled = false;
            TurnOnEditBth.Show();
            MainPicture.Hide();
            string sql = "select id_stanowiska, nazwa as Stanowisko from STANOWISKA ";

            LoadDataToSqldataGridView("Stanowiska", sql);
            JobTitlesbtn.Enabled = false;
        }
Ejemplo n.º 15
0
        private void OfficesBtn_Click(object sender, EventArgs e)
        {
            Key = 3;
            tableLayoutPanel3.Hide();
            tableLayoutPanel2.Hide();
            tableLayoutPanel1.Hide();
            SaveBtn.Hide();
            EmployeesBtn.Enabled   = true;
            JobTitlesbtn.Enabled   = true;
            DepartmentsBtn.Enabled = true;
            SqldataGridView.Show();
            CreateBtn.Show();
            UpdateBtn.Show();
            DeleteBtn.Show();
            CreateBtn.Enabled = true;
            UpdateBtn.Enabled = false;
            DeleteBtn.Enabled = false;
            TurnOnEditBth.Show();
            MainPicture.Hide();
            string sql = "select id_siedziby as ID ,nazwa_siedziby as Oddział, adres as Adres from SIEDZIBY ";

            LoadDataToSqldataGridView("Siedziby", sql);
            OfficesBtn.Enabled = false;
        }
Ejemplo n.º 16
0
        private void DepartmentsBtn_Click(object sender, EventArgs e)
        {
            Key = 4;
            tableLayoutPanel3.Hide();
            tableLayoutPanel2.Hide();
            tableLayoutPanel1.Hide();
            SaveBtn.Hide();
            EmployeesBtn.Enabled = true;
            JobTitlesbtn.Enabled = true;
            OfficesBtn.Enabled   = true;
            SqldataGridView.Show();
            CreateBtn.Show();
            UpdateBtn.Show();
            DeleteBtn.Show();
            CreateBtn.Enabled = true;
            UpdateBtn.Enabled = false;
            DeleteBtn.Enabled = false;
            TurnOnEditBth.Show();
            MainPicture.Hide();
            string sql = "select d.nazwa_dzialu, s.nazwa_siedziby, s.adres from DZIALY d join SIEDZIBY s on  d.id_siedziby=s.id_siedziby ";

            LoadDataToSqldataGridView("Dzialy", sql);
            DepartmentsBtn.Enabled = false;
        }
Ejemplo n.º 17
0
        internal void DeleteNotification(IWebDriver driver)
        {
            // Wait and Click on Notification
            GlobalDefinitions.WaitForElementClickable(driver, "XPath", "//*[@id='account-profile-section']/div/div[1]/div[2]/div/div", 10);
            NotificationBtn.Click();

            // Wait and Click on See All button
            GlobalDefinitions.WaitForElementClickable(driver, "XPath", "//a[contains(text(), 'See All')]", 10);
            SeeAllLink.Click();

            // Wait and Click on Load More
            Thread.Sleep(2000);
            GlobalDefinitions.ScrollToBottom();
            Thread.Sleep(500);
            GlobalDefinitions.WaitForElementClickable(driver, "XPath", "//a[contains(text(),'Load More')]", 15);

            ShowLessAndLoadMoreBtn.Click();

            // Judge if all notifications are fully loaded
            Thread.Sleep(1500);
            bool present;

            do
            {
                try
                {
                    driver.FindElement(By.XPath("//a[contains(text(),'Load More')]"));
                    present = true;
                }
                catch (NoSuchElementException)
                {
                    present = false;
                    break;
                }

                GlobalDefinitions.ScrollToBottom();
                Thread.Sleep(500);
                driver.FindElement(By.XPath("//a[contains(text(),'Load More')]")).Click();
                Thread.Sleep(1500);
            }while (present);


            // Record the elements qty
            Thread.Sleep(500);
            var notification = driver.FindElements(By.XPath("//h4[contains(text(),'Service Request')]"));

            NotificationQty = notification.Count();
            Debug.WriteLine("The qty of notification is:" + NotificationQty);

            // Scroll down to end of page and Select the notification
            GlobalDefinitions.ScrollToBottom();
            Thread.Sleep(1000);
            LastNotificationCheckbox.Click();
            Thread.Sleep(300);

            // Scroll to top of page
            GlobalDefinitions.ScrollToTop();
            Thread.Sleep(500);

            // Click on delete button
            GlobalDefinitions.WaitForElementClickable(driver, "XPath", "//div[@data-tooltip='Delete selection']", 10);
            DeleteBtn.Click();

            // Extent report
            Base.test.Log(LogStatus.Pass, "Delete notification successfully!");
        }
Ejemplo n.º 18
0
 public void Delete()
 {
     DeleteBtn.ClickWait();
     AcceptAlert();
     CheckErrorAndSwitchDefault();
 }
Ejemplo n.º 19
0
 void EditLabel(int check)
 {
     if (check == 0)
     {
         label1.Hide();
         label2.Hide();
         label3.Hide();
         label4.Hide();
         label5.Hide();
         textBox2.Hide();
         textBox3.Hide();
         textBox4.Hide();
         textBox5.Hide();
         textBox6.Hide();
         button6.Hide();
         DeleteBtn.Hide();
         SearchBtn.Hide();
         SortName.Hide();
         SortGroup.Hide();
         SortPoint.Hide();
     }
     if (check == 1)
     {
         label1.Show();
         label2.Show();
         label3.Show();
         label4.Show();
         label5.Show();
         textBox2.Show();
         textBox3.Show();
         textBox4.Show();
         textBox5.Show();
         textBox6.Show();
         button6.Show();
         DeleteBtn.Hide();
         SortName.Hide();
         SortGroup.Hide();
         SortPoint.Hide();
     }
     if (check == 2)
     {
         DeleteBtn.Show();
         label1.Show();
         label2.Hide();
         label3.Hide();
         label4.Hide();
         label5.Hide();
         textBox2.Show();
         textBox3.Hide();
         textBox4.Hide();
         textBox5.Hide();
         textBox6.Hide();
         button6.Hide();
         SearchBtn.Hide();
         SortName.Hide();
         SortGroup.Hide();
         SortPoint.Hide();
     }
     if (check == 3)
     {
         SearchBtn.Show();
         label1.Show();
         label2.Hide();
         label3.Hide();
         label4.Hide();
         label5.Hide();
         textBox2.Show();
         textBox3.Hide();
         textBox4.Hide();
         textBox5.Hide();
         textBox6.Hide();
         button6.Hide();
         DeleteBtn.Hide();
         SortName.Hide();
         SortGroup.Hide();
         SortPoint.Hide();
     }
     if (check == 4)
     {
         SearchBtn.Hide();
         label1.Hide();
         label2.Hide();
         label3.Hide();
         label4.Hide();
         label5.Hide();
         textBox2.Hide();
         textBox3.Hide();
         textBox4.Hide();
         textBox5.Hide();
         textBox6.Hide();
         button6.Hide();
         DeleteBtn.Hide();
         SortName.Show();
         SortGroup.Show();
         SortPoint.Show();
     }
 }
Ejemplo n.º 20
0
        private void btnFound_Click(object sender, EventArgs e)
        {
            var billDate = dtp_BillDate.Value;
            var salesRep = store.employee.FirstOrDefault(m => m.EmployeeName == MandobtextBox.Text);

            var customer = store.customers.FirstOrDefault(c => c.Name == CustomerNametextBox.Text);

            SalesOrder = (
                from s in store.SalesOrder
                where (s.SalesRepresentative.Employee_Id == salesRep.ID /*&& s.SalesOrderDate == billDate*/ && s.customers_Id == customer.ID)
                select s
                ).FirstOrDefault();
            if (SalesOrder != null)
            {
                panel1.Show();
                panel2.Show();
                panel3.Show();
                btn_AddToBills.Show();
                btn_Cancel.Show();
                btn_Print.Show();
                btn_Save.Show();
                editBtn.Show();
                searchBtn.Show();
                SearchtextBox3.Show();
                DeleteBtn.Show();
                dgv_SalesBill.Show();
                details = store.SalesOrderDetails.Where(s => s.salesOrder_id == SalesOrder.ID).ToList();
                //dgv_SalesBill.Rows.Add();

                int row = 0;
                //row = dgv_SalesBill.Rows.Count - 2;
                SalesOredersPaymment   = store.SalesOredersPaymments.FirstOrDefault(s => s.SalesOrder_id == SalesOrder.ID);
                numericPaiedCost.Value = decimal.Parse(SalesOredersPaymment.Paied.ToString());
                numericResCost.Value   = decimal.Parse(SalesOredersPaymment.Rest.ToString());
                numericTotalCost.Value = decimal.Parse(SalesOrder.SalesOrederTotalPrice.ToString());

                foreach (var item in details)
                {
                    dgv_SalesBill.Rows.Add();

                    var product = new Products();
                    product = store.products.FirstOrDefault(p => p.ID == item.products_id);

                    //dgv_SalesBill["ProductID", row].Value = product.ID.ToString();
                    //dgv_SalesBill["productName", row].Value = product.ProductName.ToString();
                    //dgv_SalesBill["price", row].Value = product.Price_customer.ToString();
                    //dgv_SalesBill["discount", row].Value = product.Discount.ToString();
                    //dgv_SalesBill["productQuantity", row].Value = item.quantity.ToString();
                    dgv_SalesBill.Rows[row].Cells[4].Value = product.ID.ToString();
                    dgv_SalesBill.Rows[row].Cells[3].Value = product.ProductName.ToString();
                    dgv_SalesBill.Rows[row].Cells[1].Value = product.Price_customer.ToString();
                    dgv_SalesBill.Rows[row].Cells[0].Value = product.Discount.ToString();
                    dgv_SalesBill.Rows[row].Cells[2].Value = item.quantity.ToString();

                    row++;
                }
            }
            else
            {
                MessageBox.Show("هذه  الفاتوره ليست موجوده");
            }
        }
Ejemplo n.º 21
0
 /// <summary>
 /// Adding method when user delete data from dgv
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 ///
 private void dgView_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e)
 {
     e.Cancel = true; //To Prevent Deleting data when user press No in confirm dialog
     DeleteBtn.PerformClick();
 }