public MunisUserForm(ExtendedForm parentForm) : base(parentForm) { Shown += MunisUserForm_Shown; Load += MunisUser_Load; InitializeComponent(); ShowDialog(parentForm); }
public static void OrgObjSearch(ExtendedForm parentForm) { try { using (var newDialog = new Dialog(parentForm)) { string org = ""; string obj = ""; string fy = ""; newDialog.Text = "Org/Object Code Search"; newDialog.AddTextBox("Org", "Org Code:"); newDialog.AddTextBox("Obj", "Object Code:"); newDialog.AddTextBox("FY", "Fiscal Year:"); newDialog.SetControlValue("FY", DateTime.Now.Year); newDialog.ShowDialog(); if (newDialog.DialogResult == DialogResult.OK) { org = newDialog.GetControlValue("Org").ToString(); obj = newDialog.GetControlValue("Obj").ToString(); fy = newDialog.GetControlValue("FY").ToString(); if (org.Trim() != "" && DataConsistency.IsValidYear(fy)) { NewOrgObjView(org, obj, fy, parentForm); } } } } catch (Exception ex) { ErrorHandling.ErrHandle(ex, System.Reflection.MethodBase.GetCurrentMethod()); } }
public SoftwareDeployment(ExtendedForm parentForm, Device targetDevice) { this.parentForm = parentForm; deploy = new DeploymentUI(parentForm, targetDevice); deploy.UsePowerShell(); deploy.UsePsExec(); }
/// <summary> /// Sends a copy of this grid to a new <see cref="GridForm"/> instance. /// </summary> /// <param name="grid"></param> /// <param name="parentForm"></param> public static void CopyToGridForm(this DataGridView grid, ExtendedForm parentForm, DoubleClickAction type = DoubleClickAction.ViewOnly) { GridForm NewGridForm = new GridForm(parentForm, grid.Name + " Copy"); NewGridForm.AddGrid(grid.Name, grid.Name, type, ((DataTable)grid.DataSource).Copy()); NewGridForm.Show(); }
public UserManagerForm(ExtendedForm parentForm) : base(parentForm) { Load += frmUserManager_Load; InitializeComponent(); StyleFunctions.SetGridStyle(UserGrid, GridTheme); Show(); }
public GKUpdaterForm(ExtendedForm parentForm) : base(parentForm) { InitializeComponent(); this.DisableDoubleBuffering(); MaxUpdates.Value = concurrentUpdates; ProgressControlsTable.DoubleBuffered(true); DoQueueCheckerLoop(); }
public ViewHistoryForm(ExtendedForm parentForm, string entryGuid, string deviceGuid) : base(parentForm, entryGuid) { controlParser = new DBControlParser(this); InitializeComponent(); InitDBControls(); this.deviceGuid = deviceGuid; ViewEntry(entryGuid); }
private void lbReaction_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { extended = new PostFeedExtended(Post, _event, _activeUser); var extendedPostform = new ExtendedForm(); extendedPostform.tbpPostWatch.Controls.Add(extended); extendedPostform.ShowDialog(); }
public TrackDeviceForm(Device device, ExtendedForm parentForm) : base(parentForm) { InitializeComponent(); currentTrackingDevice = device; ClearAll(); SetDates(); SetGroups(); LoadTracking(); Show(); }
public CopyFilesForm(ExtendedForm parentForm, Device targetDevice, string sourceDirectory, string targetDirectory) : base(parentForm) { InitializeComponent(); this.Owner = parentForm; pushFilesControl = new FileTransferUI(this, targetDevice, true, sourceDirectory, targetDirectory, "Push Files"); this.Controls.Add(pushFilesControl); pushFilesControl.CriticalStopError += new System.EventHandler(CopyCritcalError); pushFilesControl.Disposed += PushFilesControl_Disposed; this.Show(); }
public DeploymentUI(ExtendedForm parentForm, Device targetDevice) { this.targetDevice = targetDevice; this.parentForm = parentForm; watchdogCancelTokenSource = new CancellationTokenSource(); watchdogTask = new Task(() => Watchdog(watchdogCancelTokenSource.Token), watchdogCancelTokenSource.Token); InitLogWindow(); }
public NewDeviceForm(ExtendedForm parentForm) : base(parentForm) { InitializeComponent(); InitDBControls(); controlParser = new DBControlParser(this); controlParser.EnableFieldValidation(); ClearAll(); this.Show(); this.Activate(); }
public static bool AttachmentsIsOpen(ExtendedForm parentForm) { var attachForm = FindChildOfType(parentForm, typeof(AttachmentsForm)); if (attachForm != null) { attachForm.RestoreWindow(); return(true); } return(false); }
public GridForm(ExtendedForm parentForm, string title = "") : base(parentForm) { InitializeComponent(); if (!string.IsNullOrEmpty(title)) { this.Text = titlePrefix + title; } GridPanel.DoubleBuffered(true); Panel1.DoubleBuffered(true); GridPanel.RowStyles.Clear(); }
public static async void NewOrgObjView(string org, string obj, string fy, ExtendedForm parentForm) { try { parentForm.Waiting(); GridForm newGridForm = new GridForm(parentForm, "Org/Obj Info"); string glColumns = " glma_org, glma_obj, glma_desc, glma_seg5, glma_bud_yr, glma_orig_bud_cy, glma_rev_bud_cy, glma_encumb_cy, glma_memo_bal_cy, glma_rev_bud_cy-glma_encumb_cy-glma_memo_bal_cy AS 'Funds Available' "; string glMasterQry = "Select TOP " + intMaxResults + " " + glColumns + "FROM glmaster"; QueryParamCollection glParams = new QueryParamCollection(); glParams.Add("glma_org", org, true); if (!string.IsNullOrEmpty(obj)) //Show Rollup info for Object { glParams.Add("glma_obj", obj, true); string rollUpCode = await munisComms.ReturnSqlValueAsync("gl_budget_rollup", "a_org", org, "a_rollup_code"); string rollUpByCodeQry = "SELECT TOP " + intMaxResults + " * FROM gl_budget_rollup WHERE a_rollup_code = '" + rollUpCode + "'"; string budgetQry = "SELECT TOP " + intMaxResults + " a_projection_no,a_org,a_object,db_line,db_bud_desc_line1,db_bud_reason_desc,db_bud_req_qty5,db_bud_unit_cost,db_bud_req_amt5,a_account_id FROM gl_budget_detail_2"; // WHERE a_projection_no='" & FY & "' AND a_org='" & Org & "' AND a_object='" & Obj & "'" QueryParamCollection budgetParams = new QueryParamCollection(); budgetParams.Add("a_projection_no", fy, true); budgetParams.Add("a_org", org, true); budgetParams.Add("a_object", obj, true); newGridForm.AddGrid("OrgGrid", "GL Info:", await munisComms.ReturnSqlTableFromCmdAsync(munisComms.GetSqlCommandFromParams(glMasterQry, glParams.Parameters))); newGridForm.AddGrid("RollupGrid", "Rollup Info:", await munisComms.ReturnSqlTableAsync(rollUpByCodeQry)); newGridForm.AddGrid("BudgetGrid", "Budget Info:", await munisComms.ReturnSqlTableFromCmdAsync(munisComms.GetSqlCommandFromParams(budgetQry, budgetParams.Parameters))); } else // Show Rollup info for all Objects in Org { string rollUpAllQry = "SELECT TOP " + intMaxResults + " * FROM gl_budget_rollup"; QueryParamCollection rollUpParams = new QueryParamCollection(); rollUpParams.Add("a_org", org, true); newGridForm.AddGrid("OrgGrid", "GL Info:", await munisComms.ReturnSqlTableFromCmdAsync(munisComms.GetSqlCommandFromParams(glMasterQry, glParams.Parameters))); //MunisComms.Return_MSSQLTableAsync(Qry)) newGridForm.AddGrid("RollupGrid", "Rollup Info:", await munisComms.ReturnSqlTableFromCmdAsync(munisComms.GetSqlCommandFromParams(rollUpAllQry, rollUpParams.Parameters))); //MunisComms.Return_MSSQLTableAsync("SELECT TOP " & intMaxResults & " * FROM gl_budget_rollup WHERE a_org = '" & Org & "'")) } newGridForm.Show(); } catch (Exception ex) { ErrorHandling.ErrHandle(ex, System.Reflection.MethodBase.GetCurrentMethod()); } finally { parentForm.DoneWaiting(); } }
public static void LookupDevice(ExtendedForm parentForm, Device device) { if (device != null) { if (!FormIsOpenByGuid(typeof(ViewDeviceForm), device.Guid)) { new ViewDeviceForm(parentForm, device); } } else { OtherFunctions.Message("Device not found.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, "Error", parentForm); } }
public static MunisEmployee MunisUserSearch(ExtendedForm parentForm) { using (MunisUserForm newMunisSearch = new MunisUserForm(parentForm)) { if (newMunisSearch.DialogResult == DialogResult.OK) { return(newMunisSearch.EmployeeInfo); } else { return(new MunisEmployee()); } } }
public ViewDeviceForm(ExtendedForm parentForm, MappedObject device, bool startHidden = false) : base(parentForm, device, startHidden) { currentViewDevice = (Device)device; InitializeComponent(); InitDBControls(); controlParser = new DBControlParser(this); controlParser.EnableFieldValidation(); defaultFormTitle = this.Text; liveBox = new LiveBox(this); liveBox.AttachToControl(CurrentUserTextBox, DevicesCols.CurrentUser, LiveBoxSelectAction.UserSelect, DevicesCols.MunisEmpNum); liveBox.AttachToControl(DescriptionTextBox, DevicesCols.Description, LiveBoxSelectAction.SelectValue); munisToolBar = new MunisToolBar(this); munisToolBar.InsertMunisDropDown(ToolStrip1, 6); windowList = new WindowList(this); windowList.InsertWindowList(ToolStrip1); statusSlider = new SliderLabel(); statusSlider.FlashStripOnNewMessage = true; StatusStrip.Items.Add(statusSlider.ToToolStripControl(StatusStrip)); RefreshCombos(); DataGridHistory.DoubleBuffered(true); TrackingGrid.DoubleBuffered(true); SetEditMode(false); LoadCurrentDevice(); WatchdogInstance.Watchdog.StatusChanged += Watchdog_StatusChanged; if (!startHidden) { this.Show(); } else { // Let the base class know that the hidden form is ready. // Since no load event occurs, we need someway to notify // when all the components are instantiated and populated. base.HiddenFormReady(); } }
public UpdateTypeForm(ExtendedForm parentForm, bool isNoteOnly = false) : base(parentForm) { InitializeComponent(); UpdateTypeCombo.FillComboBox(Attributes.DeviceAttributes.ChangeType); if (isNoteOnly) { UpdateTypeCombo.SetSelectedAttribute(Attributes.DeviceAttributes.ChangeType["NOTE"]); UpdateTypeCombo.Enabled = false; ValidateUpdateType(); } else { UpdateTypeCombo.SelectedIndex = -1; } }
public static void ShowPingHistory(ExtendedForm parentForm, Device device) { string query = "SELECT timestamp, hostname, ip FROM device_ping_history WHERE device_guid = '" + device.Guid + "' ORDER BY timestamp DESC"; using (var results = DBFactory.GetDatabase().DataTableFromQueryString(query)) { if (results.Rows.Count > 0) { results.Columns.Add("location"); foreach (DataRow row in results.Rows) { row["location"] = NetworkInfo.LocationOfIP(row["ip"].ToString()); } var newGrid = new GridForm(parentForm, "Ping History - " + device.HostName); newGrid.AddGrid("pingGrid", "Ping History", results); newGrid.Show(); } } }
public static void POSearch(ExtendedForm parentForm) { try { string po = ""; using (var newDialog = new Dialog(parentForm)) { newDialog.Text = "PO Search"; newDialog.AddTextBox("PO", "PO #:"); newDialog.ShowDialog(); if (newDialog.DialogResult == DialogResult.OK) { po = newDialog.GetControlValue("PO").ToString(); NewMunisPOSearch(po, parentForm); } } } catch (Exception ex) { ErrorHandling.ErrHandle(ex, System.Reflection.MethodBase.GetCurrentMethod()); } }
private void InitLogWindow() { logView = new ExtendedForm(parentForm); logView.FormClosing += new FormClosingEventHandler(LogClosed); logView.Text = targetDevice.CurrentUser + " - " + defaultTitle; logView.Width = 600; logView.Height = 700; logView.MinimumSize = new System.Drawing.Size(400, 200); logView.Owner = parentForm; logView.StartPosition = FormStartPosition.CenterParent; logView.DisableDoubleBuffering(); logTextBox = new RichTextBox(); logTextBox.Dock = DockStyle.Fill; logTextBox.Font = StyleFunctions.DefaultGridFont; logTextBox.WordWrap = false; logTextBox.ReadOnly = true; logTextBox.ScrollBars = RichTextBoxScrollBars.Both; logTextBox.DetectUrls = false; logView.Controls.Add(logTextBox); logView.Show(); }
public static async void ReqSearch(ExtendedForm parentForm) { try { string reqNumber = ""; string fy = ""; using (var newDialog = new Dialog(parentForm)) { newDialog.Text = "Req Search"; newDialog.AddTextBox("ReqNum", "Requisition #:"); newDialog.AddTextBox("FY", "FY:"); newDialog.ShowDialog(); if (newDialog.DialogResult == DialogResult.OK) { reqNumber = newDialog.GetControlValue("ReqNum").ToString(); fy = newDialog.GetControlValue("FY").ToString(); if (DataConsistency.IsValidYear(fy)) { parentForm.Waiting(); var blah = await NewMunisReqSearch(reqNumber, fy, parentForm); } else { OtherFunctions.Message("Invalid year.", MessageBoxButtons.OK, MessageBoxIcon.Information, "Invalid", parentForm); } } } } catch (Exception ex) { ErrorHandling.ErrHandle(ex, System.Reflection.MethodBase.GetCurrentMethod()); } finally { parentForm.DoneWaiting(); } }
public static async void NewMunisPOSearch(string po, ExtendedForm parentForm) { try { parentForm.Waiting(); if (po == "") { return; } string query = "SELECT TOP " + intMaxResults + @" pohd_pur_no, pohd_fsc_yr, pohd_req_no, pohd_gen_cm, pohd_buy_id, pohd_pre_dt, pohd_exp_dt, pohd_sta_cd, pohd_vnd_cd, pohd_dep_cd, pohd_shp_cd, pohd_tot_amt, pohd_serial FROM poheader"; QueryParamCollection searchParams = new QueryParamCollection(); searchParams.Add("pohd_pur_no", po, true); GridForm newGridForm = new GridForm(parentForm, "MUNIS PO Info"); using (var cmd = munisComms.GetSqlCommandFromParams(query, searchParams.Parameters)) { using (var results = await munisComms.ReturnSqlTableFromCmdAsync(cmd)) { if (HasResults(results, parentForm)) { newGridForm.AddGrid("POGrid", "PO Info:", results); newGridForm.Show(); } } } } catch (Exception ex) { ErrorHandling.ErrHandle(ex, System.Reflection.MethodBase.GetCurrentMethod()); } finally { parentForm.DoneWaiting(); } }
private static async void NewMunisEmployeeSearch(string name, ExtendedForm parentForm) { try { parentForm.Waiting(); string columns = "e.a_employee_number,e.a_name_last,e.a_name_first,e.a_org_primary,e.a_object_primary,e.a_location_primary,e.a_location_p_desc,e.a_location_p_short,e.e_work_location,m.a_employee_number as sup_employee_number,m.a_name_first as sup_name_first,m.a_name_last as sup_name_last"; string query = "SELECT TOP " + intMaxResults + " " + columns + @" FROM pr_employee_master e INNER JOIN pr_employee_master m on e.e_supervisor = m.a_employee_number"; QueryParamCollection searchParams = new QueryParamCollection(); searchParams.Add("e.a_name_last", name.ToUpper(), "OR"); searchParams.Add("e.a_name_first", name.ToUpper(), "OR"); using (var cmd = munisComms.GetSqlCommandFromParams(query, searchParams.Parameters)) using (var results = await munisComms.ReturnSqlTableFromCmdAsync(cmd)) { if (HasResults(results, parentForm)) { parentForm.DoneWaiting(); GridForm newGridForm = new GridForm(parentForm, "MUNIS Employee Info"); newGridForm.AddGrid("EmpGrid", "MUNIS Info:", results); newGridForm.Show(); } } } catch (Exception ex) { ErrorHandling.ErrHandle(ex, System.Reflection.MethodBase.GetCurrentMethod()); } finally { parentForm.DoneWaiting(); } }
public static void NameSearch(ExtendedForm parentForm) { try { using (var newDialog = new Dialog(parentForm)) { newDialog.Text = "Employee Search"; newDialog.AddTextBox("Name", "First or Last Name:"); newDialog.ShowDialog(); if (newDialog.DialogResult == DialogResult.OK) { var strName = newDialog.GetControlValue("Name").ToString(); if (strName.Trim() != "") { NewMunisEmployeeSearch(strName.Trim(), parentForm); } } } } catch (Exception ex) { ErrorHandling.ErrHandle(ex, System.Reflection.MethodBase.GetCurrentMethod()); } }
public static void AssetSearch(ExtendedForm parentForm) { try { Device device = new Device(); using (var newDialog = new Dialog(parentForm)) { newDialog.Text = "Asset Search"; newDialog.AddTextBox("AssetNumber", "Asset:"); newDialog.AddTextBox("SerialNumber", "Serial:"); newDialog.ShowDialog(); if (newDialog.DialogResult == DialogResult.OK) { device.AssetTag = newDialog.GetControlValue("AssetNumber").ToString().Trim(); device.Serial = newDialog.GetControlValue("SerialNumber").ToString().Trim(); LoadMunisInfoByDevice(device, parentForm); } } } catch (Exception ex) { ErrorHandling.ErrHandle(ex, System.Reflection.MethodBase.GetCurrentMethod()); } }
public Hierarchy(ExtendedForm parentForm) : base(parentForm) { InitializeComponent(); HierarchyTree.DoubleBuffered(true); StartSearch(); }
public ViewTrackingForm(ExtendedForm parentForm, string entryGuid, Device device) : base(parentForm, entryGuid) { InitializeComponent(); ViewTrackingEntry(entryGuid, device); Show(); }
public AdvancedSearchForm(ExtendedForm parentForm) : base(parentForm) { InitializeComponent(); PopulateTableTree(); this.Show(); }