public c_batchlist_lv0(string locator, string name) : base(locator, name) { Es = new Selector("ctl00_phL_grid_lv0_es", "Es", locator, null); EsLabel = new Label(Es); Ed = new DateSelector("ctl00_phL_grid_lv0_ed", "Ed", locator, null); EdLabel = new Label(Ed); Ec = new DropDown("ctl00_phL_grid_lv0_ec", "Ec", locator, null); DataMemberName = "BatchList"; }
private void Initialize() { CustomerID = new Selector("ctl00_phG_grid_lv0_edCustomerID", "CustomerID", "ctl00_phG_grid_lv0", null, "VX301000"); CustomerID.DataField = "CustomerID"; StartDate = new DateSelector("ctl00_phG_grid_lv0_edStartDate", "StartDate", "ctl00_phG_grid_lv0", null, "VX301000"); StartDate.DataField = "StartDate"; EndDate = new DateSelector("ctl00_phG_grid_lv0_edEndDate", "EndDate", "ctl00_phG_grid_lv0", null, "VX301000"); EndDate.DataField = "EndDate"; Es = new Selector("ctl00_phG_grid_lv0_es", "Es", "ctl00_phG_grid_lv0", null, "VX301000"); Es.DataField = ""; ContainerType = "U"; DataMemberName = "Rentals"; }
protected override void internalStart() { { CP = new Control_Print(); CP.Elems.SetRowFromGrid(MyTools.GL_Auto); var DateSelect = new DateSelector(_negotiationAssistant.YMD); CP.Elems.SetFromGrid(DateSelect.View); CP.ShowDialog(); if (_negotiationAssistant.WorkerID == 0) { MessageBox.Show("Не выбран пробоотборщик!"); return; } _negotiationAssistant.YMD = MyTools.YMD_From_DateTime(DateSelect.dateTime); } Objecte obj = _negotiationAssistant.Objecte; Accredit acc = AdditionnTable.GetAccredit(); string sampler = _negotiationAssistant.Worker.Post_FIO; foreach (var one in obj.Wells) { book = TemplateStorage.WorkBook; Substitute = new CellExchange_Class(book.GetSheetAt(0)); var Details = obj.Client.Detail; Substitute.AddExchange("{абонент}", Details.FullName, 0); if (obj.Separate) { Substitute.AddExchange("{юридический адрес}", obj.Detail.LegalAdres, 0); } else { Substitute.AddExchange("{юридический адрес}", Helpers.LogicHelper.AdresLogic.FirstModel(Details.AdresLegalID).Adr, 0); } Substitute.AddExchange("{тип колодца}", new TypeWell(one.TypeWellID).FullName + " " + new TypeWell(one.TypeWellID).CurtName + '-' + one.Number, 0); Substitute.AddExchange("{место отбора}", obj.Adres.CutAdres(false), 0); Substitute.AddExchange("{аккредитация}", acc.Text, 0); Substitute.AddExchange("{дата аккредитации}", acc.YMDFrom, 0); Substitute.AddExchange("{пробоотборщик}", sampler, 0); //Substitute.AddExchange("{представитель абонента}", sample == null ? string.empty : sample.IDRepresentative > 0 ? new Representative(sample.IDRepresentative).Post_FIO : string.empty, 0); Substitute.Exchange(); Print("Акты", "акт отбора пробы " + new TypeWell(one.TypeWellID).FullName + ' ' + one.Number, EPathPrint.Documents); } }
public c__schedulehistoryparameters__frmschedulehistory(string locator, string name) : base(locator, name) { ScheduleID = new Selector("ctl00_phDS_ds_pnlScheduleHistory_frmScheduleHistory_edScheduleID", "Schedule ID", locator, null); ScheduleIDLabel = new Label(ScheduleID); ScheduleID.DataField = "ScheduleID"; FromDateTime = new DateSelector("ctl00_phDS_ds_pnlScheduleHistory_frmScheduleHistory_edFromDateTime", "From Date Time", locator, null); FromDateTimeLabel = new Label(FromDateTime); FromDateTime.DataField = "FromDateTime"; ToDateTime = new DateSelector("ctl00_phDS_ds_pnlScheduleHistory_frmScheduleHistory_edToDateTime", "To Date Time", locator, null); ToDateTimeLabel = new Label(ToDateTime); ToDateTime.DataField = "ToDateTime"; LblSchedule_ = new Label("ctl00_phDS_ds_pnlScheduleHistory_frmScheduleHistory_lblSchedule", "Schedule ID :", locator, null); LblFromDateTime_ = new Label("ctl00_phDS_ds_pnlScheduleHistory_frmScheduleHistory_lblFromDateTime", "From:", locator, null); LblToDateTime_ = new Label("ctl00_phDS_ds_pnlScheduleHistory_frmScheduleHistory_lblToDateTime", "To:", locator, null); DataMemberName = "_ScheduleHistoryParameters_"; Buttons = new PxButtonCollection(); }
public c_grid_row(c_batchlist_grid grid) : base(grid) { Files = new FileColumnButton(null, "Files", grid.Locator, "Files"); Notes = new NoteColumnButton(null, "Notes", grid.Locator, "Notes"); Selected = new CheckBox("ctl00_phL_grid_ef", "Selected", grid.Locator, "Selected"); Selected.DataField = "Selected"; AUScheduleHistory__ScheduleID = new PXTextEdit("ctl00_phL_grid_ei", "Schedule ID", grid.Locator, "AUScheduleHistory__ScheduleID"); AUScheduleHistory__ScheduleID.DataField = "AUScheduleHistory__ScheduleID"; AUScheduleHistory__ExecutionDate = new DateSelector("_ctl00_phL_grid_lv0_ed4", "Execution Date", grid.Locator, "AUScheduleHistory__ExecutionDate"); AUScheduleHistory__ExecutionDate.DataField = "AUScheduleHistory__ExecutionDate"; AUScheduleHistory__ExecutionResult = new PXTextEdit("ctl00_phL_grid_ei", "Execution Result", grid.Locator, "AUScheduleHistory__ExecutionResult"); AUScheduleHistory__ExecutionResult.DataField = "AUScheduleHistory__ExecutionResult"; AUScheduleHistory__Ticks = new PXNumberEdit("ctl00_phL_grid_en", "Ticks", grid.Locator, "AUScheduleHistory__Ticks"); AUScheduleHistory__Ticks.DataField = "AUScheduleHistory__Ticks"; AUScheduleHistory__ScheduleID_Description = new PXTextEdit("ctl00_phL_grid_ei", "Description", grid.Locator, "AUScheduleHistory__ScheduleID_Description"); AUScheduleHistory__ScheduleID_Description.DataField = "AUScheduleHistory__ScheduleID_Description"; Module = new DropDown("_ctl00_phL_grid_lv0_ec", "Module", grid.Locator, "Module"); Module.DataField = "Module"; Module.Items.Add("GL", "GL"); Module.Items.Add("AP", "AP"); Module.Items.Add("AR", "AR"); Module.Items.Add("CM", "CM"); Module.Items.Add("CA", "CA"); Module.Items.Add("IN", "IN"); Module.Items.Add("DR", "DR"); Module.Items.Add("FA", "FA"); Module.Items.Add("PM", "PM"); Module.Items.Add("PR", "PR"); BatchNbr = new Selector("_ctl00_phL_grid_lv0_es", "Batch Number", grid.Locator, "BatchNbr"); BatchNbr.DataField = "BatchNbr"; LedgerID = new Selector("_ctl00_phL_grid_lv0_es", "Ledger", grid.Locator, "LedgerID"); LedgerID.DataField = "LedgerID"; DateEntered = new DateSelector("_ctl00_phL_grid_lv0_ed11", "Transaction Date", grid.Locator, "DateEntered"); DateEntered.DataField = "DateEntered"; LastModifiedByID_Modifier_Username = new PXTextEdit("ctl00_phL_grid_ei", "Last Modified By", grid.Locator, "LastModifiedByID_Modifier_Username"); LastModifiedByID_Modifier_Username.DataField = "LastModifiedByID_Modifier_Username"; FinPeriodID = new Selector("_ctl00_phL_grid_lv0_es", "Post Period", grid.Locator, "FinPeriodID"); FinPeriodID.DataField = "FinPeriodID"; ControlTotal = new PXNumberEdit("ctl00_phL_grid_en", "Control Total", grid.Locator, "ControlTotal"); ControlTotal.DataField = "ControlTotal"; Description = new PXTextEdit("ctl00_phL_grid_ei", "Description", grid.Locator, "Description"); Description.DataField = "Description"; }
protected override void internalStart() { Objecte obj = _negotiationAssistant.Objecte; book = TemplateStorage.WorkBook; Substitute = new CellExchange_Class(book.GetSheetAt(0)); ClientName(_negotiationAssistant.Objecte.Client); NumberFolder(obj.NumberFolder); #region Подписывающий var works = AdditionnTable.GetSigner(data.ETypeTemplate.LetterNotification, "Письмо"); Substitute.AddExchange("{должность}", works.Post, 0); Substitute.AddExchange("{ФИО}", works.FIO, 0); #endregion #region адрес/дата ObjectAdres(obj, true); CP = new Control_Print(); CP.Elems.SetRowFromGrid(MyTools.GL_Auto); var DateSelect = new DateSelector(_negotiationAssistant.YMD); CP.Elems.SetFromGrid(DateSelect.View); CP.ShowDialog(); if (DateSelect.dateTime == null) { return; } _negotiationAssistant.YMD = MyTools.YMD_From_DateTime(DateSelect.dateTime); Substitute.AddExchange("{дата отбора}", MyTools.YearMonthDay_From_YMD(DateSelect.dateTime), 0); #endregion Substitute.AddExchange("{адрес отбора}", obj.Adres, 0); Substitute.Exchange(); Print("Письма", "Письмо", EPathPrint.Documents); }
public c_grid_row() { Files = new Selector("_ctl00_phG_grid_lv0_es", "", "ctl00_phG_grid", 2, "VX301000"); Files.DataField = ""; Files.ValueType = "PX.Web.UI.PXSelector"; Notes = new Selector("_ctl00_phG_grid_lv0_es", "", "ctl00_phG_grid", 3, "VX301000"); Notes.DataField = ""; Notes.ValueType = "PX.Web.UI.PXSelector"; CustomerID = new Selector("_ctl00_phG_grid_lv0_edCustomerID", "Customer", "ctl00_phG_grid", 4, "VX301000"); CustomerID.DataField = "CustomerID"; CustomerID.ValueType = "PX.Web.UI.PXSelector"; StartDate = new DateSelector("_ctl00_phG_grid_lv0_edStartDate", "Start Date", "ctl00_phG_grid", 5, "VX301000"); StartDate.DataField = "StartDate"; StartDate.ValueType = "PX.Web.UI.PXDateTimeEdit"; EndDate = new DateSelector("_ctl00_phG_grid_lv0_edEndDate", "End Date", "ctl00_phG_grid", 6, "VX301000"); EndDate.DataField = "EndDate"; EndDate.ValueType = "PX.Web.UI.PXDateTimeEdit"; RentalID = new Input("ctl00_phG_grid_en", "RentalID", "ctl00_phG_grid", 7, "VX301000"); RentalID.DataField = "RentalID"; RentalID.ValueType = "PX.Web.UI.PXTextEdit"; ToolCD = new Input("ctl00_phG_grid_em", "Tool Code", "ctl00_phG_grid", 8, "VX301000"); ToolCD.DataField = "ToolCD"; ToolCD.ValueType = "PX.Web.UI.PXTextEdit"; }
private void editDueDate_Click(object sender, RoutedEventArgs e) { Popup myPopup = new Popup(); myPopup.HorizontalAlignment = HorizontalAlignment.Center; myPopup.VerticalAlignment = VerticalAlignment.Center; myPopup.IsLightDismissEnabled = true; Grid g = new Grid(); ColumnDefinition cd1 = new ColumnDefinition(); g.ColumnDefinitions.Add(cd1); //cd1.Width = new GridLength(320); //ColumnDefinition cd2 = new ColumnDefinition(); //g.ColumnDefinitions.Add(cd2); //cd2.Width = new GridLength(320); RowDefinition rd1 = new RowDefinition(); rd1.Height = new GridLength(205); g.RowDefinitions.Add(rd1); RowDefinition rd2 = new RowDefinition(); g.RowDefinitions.Add(rd2); DateSelector dateSelector = new DateSelector(); dateSelector.ShowCancelButton = false; dateSelector.ShowDoneButton = false; dateSelector.Height = 200; dateSelector.Margin = new Thickness(2); dateSelector.AccentBrush = new SolidColorBrush(Colors.SteelBlue); if (taskDueDateTextBox.Text != "None") { dateSelector.SelectedDateTime = DateTime.Parse(taskDueDateTextBox.Text); } Grid.SetColumn(dateSelector, 0); Grid.SetRow(dateSelector, 0); g.Children.Add(dateSelector); TimeSelector timeSelector = new TimeSelector(); timeSelector.ShowDoneButton = false; timeSelector.ShowCancelButton = false; timeSelector.Height = 200; timeSelector.Margin = new Thickness(2); timeSelector.AccentBrush = new SolidColorBrush(Colors.SteelBlue); if (taskDueDateTextBox.Text != "None") { timeSelector.SelectedTime = DateTime.Parse(taskDueDateTextBox.Text); } Grid.SetColumn(timeSelector, 1); Grid.SetRow(timeSelector, 0); //g.Children.Add(timeSelector); Border b = new Border(); b.BorderBrush = new SolidColorBrush(Colors.LightGray); b.BorderThickness = new Thickness(2); b.Width = 314; //b.Width = 635; StackPanel s = new StackPanel(); b.Child = s; s.Orientation = Orientation.Horizontal; //s.Width = 630; //s.Width = 630; s.Background = new SolidColorBrush(Colors.White); StackPanel s1 = new StackPanel(); s1.Orientation = Orientation.Horizontal; //s1.Width = 315; s1.Width = 157; s1.Margin = new Thickness(0, 10, 0, 10); s1.FlowDirection = FlowDirection.RightToLeft; s.Children.Add(s1); StackPanel s2 = new StackPanel(); s2.Orientation = Orientation.Horizontal; s2.Width = 157; //s2.Width = 315; s2.Margin = new Thickness(0, 10, 0, 10); s2.FlowDirection = FlowDirection.LeftToRight; s.Children.Add(s2);; Button apply = new Button(); apply.Content = "Apply"; apply.HorizontalContentAlignment = HorizontalAlignment.Center; s1.Children.Add(apply); apply.Click += new RoutedEventHandler(delegate(object sender1, RoutedEventArgs ev) { DateTime d = (DateTime)dateSelector.SelectedDateTime; //DateTime d = DateTime.Parse(((DateTime)dateSelector.SelectedDateTime).ToString("yyyy-MM-dd") + "T" + ((DateTime) timeSelector.SelectedTime).ToString("HH:mm:ss")); System.Diagnostics.Debug.WriteLine(d); taskDueDateTextBox.Text = d.ToString(); EnableTaskEditMode(); myPopup.IsOpen = false; }); Button clear = new Button(); clear.Content = "Clear"; clear.HorizontalContentAlignment = HorizontalAlignment.Center; s2.Children.Add(clear); clear.Click += new RoutedEventHandler(delegate(object sender1, RoutedEventArgs ev) { taskDueDateTextBox.Text = "None"; EnableTaskEditMode(); myPopup.IsOpen = false; }); Grid.SetColumnSpan(b, 2); Grid.SetColumn(b, 0); Grid.SetRow(b, 1); g.Children.Add(b); myPopup.Child = g; myPopup.IsOpen = true; myCanvas.Children.Add(myPopup); }
protected void Page_Load(object sender, EventArgs e) { //检查访问权限 Permission.User.CheckPermission(Permission.UserPermission.READ_REPORTS); string reportTable = ReportTableList.SelectedValue; if (reportTable == "") { reportTable = DataProvider.ReportTables.First().Key; } Tuple<int, int> range = Output.DataProvider.dateRange(reportTable, DataProvider.ReportDateFields[reportTable]); dateSelector = new DateSelector(range.Item1, range.Item2); dateSelector.setYearSelector(yearSelector, "-年-"); dateSelector.setMonthSelector(monthSelector, "-月-"); dateSelector.setDaySelector(daySelector, "-日-"); if (!IsPostBack) { dateSelector.show(); } try { reportTypeLabel.Text = DataProvider.ReportTypeFields[reportTable].ToString(); ReportTypeList.Visible = true; } catch (KeyNotFoundException) { ReportTypeList.Visible = false; } ProductTypeLabel.Text = ((int)Param.ReportParam.Type.PRODUCT).ToString(); ProductFlagLabel.Text = DataProvider.ReportProductFlags[reportTable].ToString(); CityTypeLabel.Text = ((int)Param.ReportParam.Type.CITY).ToString(); auditNormalLabel.Text = ((int)Param.ReportStatus.NORMAL).ToString(); operatorTypeLabel.Text = ((int)Param.ReportParam.Type.OPERATOR).ToString(); }
public void UpdateDate() { tbDate.Text = DateSelector?.Select(Task) ?? string.Empty; }
private bool StartMenu() { CP = new Control_Print(); CP.Elems.SetColumnsFromGrid(2, MyTools.GL_Auto); CP.Elems.SetRowFromGrid(MyTools.GL_Auto); CP.Elems.SetFromGrid(new TextBlock { Text = "Объект:" }, Column: 0); TextBlock tbObj = new TextBlock { Text = this._selectionWell.Objecte.Client.Detail.FullName }; //tbObj.MouseLeftButtonDown += (sender, e) => // { // SearchGrid_Window sg = new SearchGrid_Window(G.Objecte ) // }; CP.Elems.SetFromGrid(tbObj); CP.Elems.SetRowFromGrid(MyTools.GL_Auto); DateSelector DateSelect = new DateSelector((int)MyTools.GetNowDate(MyTools.EInputDate.YMD) - 365, "Период отсчёта"); CP.Elems.SetFromGrid(DateSelect.View, Column: 0, ColumnSpan: 2); CP.Elems.SetRowFromGrid(MyTools.GL_Auto); CP.Elems.SetFromGrid(new TextBlock { Text = "Колличество месяцев для выгрузки" }, Column: 0); ComboBox cbMonths = new ComboBox(); for (int i = 1; i < 13; i++) { cbMonths.Items.Add(i); } cbMonths.SelectedIndex = cbMonths.Items.Count - 1; CP.Elems.SetFromGrid(cbMonths); CP.Elems.SetRowFromGrid(MyTools.GL_Auto); CheckBox cbSumm = new CheckBox { IsChecked = true, Content = "Выводить сумму" }; CP.Elems.SetFromGrid(cbSumm, Column: 0, ColumnSpan: 2); CP.Elems.SetRowFromGrid(MyTools.GL_Auto); CheckBox cbNorms = new CheckBox { IsChecked = true, Content = "Выводить нормативы" }; CP.Elems.SetFromGrid(cbNorms, Column: 0, ColumnSpan: 2); CP.ShowDialog(); StartYM = DateSelect.dateTime.Year * 12 + DateSelect.dateTime.Month; MonthCount = cbMonths.SelectedIndex + 1; ShowCalcs = (bool)cbSumm.IsChecked; ShowNorms = (bool)cbNorms.IsChecked; if (MonthCount > 6) { book.RemoveSheetAt(book.GetSheetIndex("Результат вертикальный")); sheet = book.GetSheet("Результат горизонтальный"); } else { book.RemoveSheetAt(book.GetSheetIndex("Результат горизонтальный")); sheet = book.GetSheet("Результат вертикальный"); } return(sheet != null); }
public void SelectDate() { System.Threading.Thread.Sleep(2000); DateSelector.Clear(); DateSelector.SendKeys("08/10/2018"); }