private void NotificationCenter1_FetchNewNotifications() { // NotificationCenter1.NotificationAlert = True isNewNotification = true; MdlOptionsManagement.getNotifications(Conversions.ToString(actionComboBox1.SelectedItem), Conversions.ToString(typeComboBox.SelectedItem), this); isNewNotification = false; }
private void FrmTimeManagement_Load(object sender, EventArgs e) { summaryBunifuDataGridView.InitializeLifetimeService(); MdlOptionsManagement.getTimeManagementAllowedFunctionalities(); payMethodComboBox.SelectedIndex = 0; MdlTimeManagement.populateMonthDropDown(); }
private void actiongeComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (firstLoad == false) { MdlOptionsManagement.getNotifications(Conversions.ToString(actionComboBox1.SelectedItem), Conversions.ToString(typeComboBox.SelectedItem), this); } }
private void EmployeeManagementForm_Load(object sender, EventArgs e) { MdlOptionsManagement.getEmployeeManagementAllowedFunctionalities(); MdlControllerModifier.clearFields(); MdlEmpManagement.populateEmployeeList(BunifuDataGridView1, employeeStatus); firstLoad = false; }
private void FrmOptionsManagement_Load(object sender, EventArgs e) { // messagesTouchButton.TakeButtonPicture(My.Resources.email) // adjustScreen(Me, FrmParentScreen.menuIsExpanded) MdlOptionsManagement.fillUpEmployeesStats(); }
private void sendEmailTouchButton_Load(object sender, EventArgs e) { string receiver = Strings.Trim(ToEmailComboBox.Text.Split('-')[1]); if (!string.IsNullOrEmpty(ToEmailComboBox.Text) & !string.IsNullOrEmpty(messageEmailRichTextBox.Text)) { MdlOptionsManagement.sendEmailNotification(ToEmailComboBox.Text, "*****@*****.**", subjectEmailTextBox.Text, messageEmailRichTextBox.Text); } }
private void Form1_Load(object sender, EventArgs e) { pnlPendingVisible = false; Timer1.Interval = (int)Math.Round(TimeSpan.FromSeconds(2d).TotalMilliseconds); Timer1.Start(); _punchID = 0; pnlPendingVisible = false; // db.needToclockedOutLastShift() // db.createIPSession() IsMdiContainer = true; My.MyProject.Forms.FrmHomePage.MdiParent = this; decimal heigt = (decimal)(My.MyProject.Computer.Screen.Bounds.Size.Height / 1.04d); Size = (Size) new Point(My.MyProject.Computer.Screen.Bounds.Size.Width, (int)Math.Round(heigt)); var tip = new ToolTip(); tip.SetToolTip(exitPictureBox, "Exit"); tip.SetToolTip(minimizePictureBox, "Minimize"); // to ignore border od Parent form foreach (Control c in Controls) { if (c is MdiClient) { c.BackColor = BackColor; int windowLong = GetWindowLong(c.Handle, GWL_EXSTYLE); windowLong = windowLong & ~WS_EX_CLIENTEDGE; SetWindowLong(c.Handle, GWL_EXSTYLE, windowLong); c.Width = c.Width + 1; break; } } MdlOptionsManagement.getClearedModels(this); My.MyProject.Forms.FrmHomePage.WindowState = FormWindowState.Maximized; if (FormsTab1.FormExists(My.MyProject.Forms.FrmHomePage.Name)) { return; } else { AddFormToPanel(My.MyProject.Forms.FrmHomePage); FormsTab1.AddFormTab("Home Page", My.MyProject.Forms.FrmHomePage.Name); } selectedOption = My.MyProject.Forms.FrmHomePage; MdlLoadingSetting.adjustScreen(selectedOption, menuIsExpanded); MdlLoadingSetting.adjustScreen(PanelWindows, menuIsExpanded); // FrmHomePage.Show() // HarvesterAlive1.Enabled = True // HideLoadForm(); }
private void EmployeeManagementForm_Load(object sender, EventArgs e) { pictureExtendsion = ""; PictureLocalPath = ""; MdlOptionsManagement.getEmployeeManagementAllowedFunctionalities(); // adjustScreen(Me, FrmParentScreen.menuIsExpanded) MdlControllerModifier.clearFields(); var jobDescriptionsTable = db.getTableInfo("Employees", "distinct(Job_Description)", "order by Job_Description").Rows; jobDescriptionComboBox.Items.Clear(); foreach (DataRow job in jobDescriptionsTable) { jobDescriptionComboBox.Items.Add(job["Job_Description"]); } }
// if button in notification centre is clicked... private void NotificationCenter1_NotifyButtonPressed(char ButtonValue, int NotifyRecord, string NotifyType, string NotifyDetails) { var db = new DatabaseHelper(); if (ButtonValue.Equals('\u0005')) { db.saveActionTaken(My.MyProject.Forms.FrmLoginWindow._userID, NotifyRecord, "Dismissed", "N/A"); } else if (ButtonValue.Equals('\u0006')) { My.MyProject.Forms.FrmMessage.Show(); } else if (ButtonValue.Equals('\u0004')) { db.saveActionTaken(My.MyProject.Forms.FrmLoginWindow._userID, NotifyRecord, "Solved", "N/A"); } else if (ButtonValue.Equals('\u0001')) { db.saveActionTaken(My.MyProject.Forms.FrmLoginWindow._userID, NotifyRecord, "Approved", "N/A"); } else if (ButtonValue.Equals('\u0002')) { db.saveActionTaken(My.MyProject.Forms.FrmLoginWindow._userID, NotifyRecord, "Declined", "N/A"); } else if (ButtonValue.Equals('\a')) { notificationID = NotifyRecord; MdlOptionsManagement.getNotificationDetail(NotifyRecord); My.MyProject.Forms.FrmActionDetails.Show(); } else if (ButtonValue.Equals('\t')) // change adress { string newAddress = ""; newAddress = NotifyDetails.Substring(100, NotifyDetails.Length - 101); newAddress = newAddress.Replace("New Address:", "~"); newAddress = newAddress.Replace(". Old Address:", "~"); newAddress = newAddress.Split(')')[0]; newAddress = Strings.Trim(newAddress.Split('~')[1]); My.MyProject.Forms.FrmdeleteWarning.noBunifuButton.Text = "OK"; My.MyProject.Forms.FrmdeleteWarning.confirmationPanel.Hide(); My.MyProject.Forms.FrmdeleteWarning.ButtonPanel.Show(); My.MyProject.Forms.FrmdeleteWarning.imageWarningLabel.ImageIndex = 1; My.MyProject.Forms.FrmdeleteWarning.mainMessageLabel.Text = Conversions.ToString(db.updatePersonalInfo(NotifyRecord, "Address", newAddress)); db.saveActionTaken(My.MyProject.Forms.FrmLoginWindow._userID, NotifyRecord, "Solved", "N/A"); My.MyProject.Forms.FrmdeleteWarning.Show(); } }
private void frmcfialabel_load(object sender, EventArgs e) { tooltip.SetToolTip(pasteBunifuButton, "Paste"); tooltip.SetToolTip(addBttn, "Add Label"); MdlOptionsManagement.getCFIALabelFunctionalities(this); { var withBlock = cboBooking; withBlock.DataSource = MinibookingService.GetJointBooking(tgActiveBooking.Value); withBlock.DisplayMember = "BookingNumber"; withBlock.ValueMember = "MinibookingId"; } cboBooking.AutoCompleteMode = AutoCompleteMode.SuggestAppend; cboBooking.AutoCompleteSource = AutoCompleteSource.ListItems; // tbCustomer.DroppedDown = True fromdatetimepicker.Value = DateAndTime.Now; todatetimepicker.Value = DateAndTime.Now; sampletitlecombobox.SelectedIndex = 1; resizeCagoLabels(1); }
private void Form1_Load(object sender, EventArgs e) { MdlOptionsManagement.fillUpEmployeesStats(); firstLoad = true; { var withBlock = NotificationCenter1; withBlock.NotifyButtonDefinitions('\u0001', "Approve", Color.Green); withBlock.NotifyButtonDefinitions('\u0002', "Decline", Color.Firebrick); withBlock.NotifyButtonDefinitions('\u0003', "Hide", Color.FromKnownColor(KnownColor.ControlDarkDark)); withBlock.NotifyButtonDefinitions('\u0004', "Solved", Color.Teal); withBlock.NotifyButtonDefinitions('\u0005', "Dismiss", Color.Firebrick); withBlock.NotifyButtonDefinitions('\u0006', "Message", Color.DarkSlateGray, true); withBlock.NotifyButtonDefinitions('\a', "Details", Color.FromKnownColor(KnownColor.SteelBlue), true); withBlock.NotifyButtonDefinitions('\b', "Confirm", Color.Green); withBlock.NotifyButtonDefinitions('\t', "Update Address", Color.Green); } if (MdlOptionsManagement.canSeeNotificationas == false) { NotificationCenter1.Hide(); } else { actionComboBox1.SelectedIndex = 0; typeComboBox.SelectedIndex = 0; MdlOptionsManagement.getNotifications(Conversions.ToString(actionComboBox1.SelectedItem), Conversions.ToString(typeComboBox.SelectedItem), this); firstLoad = false; } if (MdlOptionsManagement.canSeeMessages == false) { messageEmployeeeTableLayoutPanel.Hide(); } else { messageEmployeeeTableLayoutPanel.Show(); } }
private void loginButton_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(usernameTextBox.Text) | string.IsNullOrEmpty(passwordTextBox.Text)) { warningLabel.Text = "Fields cannot be empty"; } else { db.checkLogin(Strings.Trim(usernameTextBox.Text), Strings.Trim(passwordTextBox.Text)); if (db._userExists) { var employee = EmployeeService.GetById(db._ID); db.getClearanceLevel(); _employeeName = (employee.First_Name + " " + employee.Last_Name).ToUpper(); payMethod = employee.Pay_Method; warningLabel.Text = ""; _userID = employee.ID; Hide(); MdlOptionsManagement.checkProbationReminders(); MdlOptionsManagement.checkHolidayReminders(); MdlOptionsManagement.checkBlockedContainers(); My.MyProject.Forms.FrmParentScreen.Show(); My.MyProject.Forms.FrmParentScreen.employeeNameLabel.Text = _employeeName; VesselVoyageService.UpdateIsActiveDateLRDLessThanYesterday(); // Dim newMstream As New System.IO.MemoryStream(CType(db.getEmployeePicture(_userID), Byte())) // 'Create a new image from the bytes from the memory // Dim ImageFromDB As New Bitmap(newMstream) var ftpMdl = new MdlFtp(); var ImageFromDB = ftpMdl.GetFTPImage(employee.EmployeePicturePath); My.MyProject.Forms.FrmParentScreen.profileShapedPictureBox1.Image = ImageFromDB; } else { warningLabel.Text = "Wrong username or password"; } } }