//protected GridHelper gridHelper = null; protected void Page_Load(object sender, System.EventArgs e) { this.gridHelper = new GridHelperNew(this.gridWebGrid, DtSource); this._helper = new WebQueryHelperNew(null, this.cmdGridExport, this.gridWebGrid, this.pagerSizeSelector, this.pagerToolBar, this.languageComponent1, DtSource); this._helper.LoadGridDataSource += new EventHandler(_helper_LoadGridDataSource); this._helper.DomainObjectToGridRow += new EventHandler(_helper_DomainObjectToGridRow); this._helper.DomainObjectToExportRow += new EventHandler(_helper_DomainObjectToExportRow); this._helper.GetExportHeadText += new EventHandler(_helper_GetExportHeadText); //this._helper.GridCellClick +=new EventHandler(_helper_GridCellClick); if (!this.IsPostBack) { // 初始化页面语言 this.InitPageLanguage(this.languageComponent1, false); /* added by jessie lee, 2005/12/30, * 在在制分布页面判断工序是否为FQC工序 */ bool isFQC = false; if (string.Compare(this.GetRequestParam("OperationCode"), "TS", true) != 0) { FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider); isFQC = facadeFactory.CreateQueryFacade3().IsOpFQC( this.GetRequestParam("OperationCode"), this.GetRequestParam("ItemCode"), this.GetRequestParam("MoCode"), FormatHelper.TODateInt(this.GetRequestParam("STARTDATE")), FormatHelper.TODateInt(this.GetRequestParam("ENDDATE"))); } this.ViewState["IsFQC"] = isFQC; this._initialWebGrid(); this.txtItemCodeQuery.Text = this.GetRequestParam("ItemCode"); this.txtMoCodeQuery.Text = this.GetRequestParam("MoCode"); this.txtOperationCodeQuery.Text = this.GetRequestParam("OperationCode"); this.txtStartDate.Value = this.GetRequestParam("STARTDATE"); this.txtEndDate.Value = this.GetRequestParam("ENDDATE"); this._helper.Query(sender); } }
public void LoadControl() { if (PatronPointsID != "") { // Update: var o = PatronPoints.FetchObject(int.Parse(PatronPointsID)); AwardReasonCd.SelectedValue = o.AwardReasonCd.ToString(); AwardDate.Text = FormatHelper.ToNormalDate(o.AwardDate); NumPoints.Text = FormatHelper.ToInt(o.NumPoints); if (o.BadgeAwardedFlag) { pnlEditOnly.Visible = true; BadgeAwarded.Text = DAL.Badge.GetBadge(o.BadgeID).AdminName; } EventCode.Text = o.EventCode; if (o.isBookList) { pnlBook.Visible = true; } if (o.isEvent) { pnlEvent.Visible = true; } if (o.isGame) { pnlGame.Visible = true; } if (o.isGameLevelActivity) { pnlMini.Visible = true; var mg = Minigame.FetchObject(o.GameLevelActivityID); if (mg != null) { lblMGame.Text = mg.AdminName; } } } }
private bool CheckLicense() { //Add by Jarvis 20121218 License #if !DEBUG DBDateTime dbDateTime = FormatHelper.GetNowDBDateTime(DataProvider); DateTime dtNow = FormatHelper.ToDateTime(dbDateTime.DBDate, dbDateTime.DBTime); ContextHelper.CurrentServerDate = dtNow; LicenseInfo license = ContextHelper.License; if (license.Status != LicenseStatus.Valid) { Exception ex = new Exception("$License_Expired , $Contact_SysAdmin !"); ExceptionManager.Raise(this.GetType().BaseType, "$License_Expired", "", ex); return(false); } else { DateTime exprieDate = license.ExpireDate; TimeSpan ts = exprieDate - dtNow; if (ts.Days <= LicenseContinue.LicenseAdvanceDays) { languageComponent1.Language = this.drpLanguageNew.SelectedValue.Trim(); string message = this.languageComponent1.GetString("$License_Will_Expire_After") + " " + ts.Days + " " + this.languageComponent1.GetString("$License_Will_Expire_Days") + "," + this.languageComponent1.GetString("$Contact_SysAdmin") + "!"; string scriptString = string.Format("<script language=\"javascript\">alert('{0}');location.href='{1}'</script>", message, this.MakeRedirectUrl("./FStartPage.aspx")); RegisterClientScriptBlock("LicenseInfo", scriptString); } else { this.Response.Redirect(this.MakeRedirectUrl("./FStartPage.aspx"), false); } //可设置在登录时/所有页面检查License LicenseContinue.LicenseGo = string.Empty;//"Continue"; } #endif #if DEBUG this.Response.Redirect(this.MakeRedirectUrl("./FStartPage.aspx"), false); #endif return(true); }
protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj) { return(new Infragistics.WebUI.UltraWebGrid.UltraGridRow( new object[] { ((OQCFirstHandingYieldDetail)obj).LotNo.ToString(), ((OQCFirstHandingYieldDetail)obj).LotSize.ToString(), ((OQCFirstHandingYieldDetail)obj).SSize.ToString(), ((OQCFirstHandingYieldDetail)obj).ActCheckSize.ToString(), ((OQCFirstHandingYieldDetail)obj).Agradetimes.ToString(), ((OQCFirstHandingYieldDetail)obj).Bggradetimes.ToString(), ((OQCFirstHandingYieldDetail)obj).Cgradetimes.ToString(), ((OQCFirstHandingYieldDetail)obj).ZGrageTimes.ToString(), this.languageComponent1.GetString(((OQCFirstHandingYieldDetail)obj).LotStatus.ToString()), FormatHelper.ToDateString(((OQCFirstHandingYieldDetail)obj).MaintainDate), FormatHelper.ToTimeString(((OQCFirstHandingYieldDetail)obj).MaintainTime), ((OQCFirstHandingYieldDetail)obj).MaintainUser.ToString() } )); }
protected void Page_Load(object sender, System.EventArgs e) { // 初始化页面语言 this.InitPageLanguage(this.languageComponent1, false); this.imgSelect.Attributes.Add("onclick", "MoveUserGroup('" + this.lstUnSelectedColumn.ClientID + "','" + this.lstSelectedColumn.ClientID + "')"); this.imgUnSelect.Attributes.Add("onclick", "MoveUserGroup('" + this.lstSelectedColumn.ClientID + "','" + this.lstUnSelectedColumn.ClientID + "')"); if (this.IsPostBack == false) { ReportViewFacade rptFacade = new ReportViewFacade(this.DataProvider); RptViewDataSourceColumn[] columns = rptFacade.GetRptViewDataSourceColumnByDataSourceId(Convert.ToInt32(this.designView.DesignMain.DataSourceID)); for (int i = 0; columns != null && i < columns.Length; i++) { if (FormatHelper.StringToBoolean(columns[i].Visible) == true) { this.lstUnSelectedColumn.Items.Add(new ListItem(columns[i].Description, columns[i].ColumnName)); } } this.lblDesignStep2Title.Text = this.languageComponent1.GetString("$PageControl_DesignStep2Title"); } }
public ActionResult Logout() { try { HttpCookie cookie = Request.Cookies["Session"]; if (cookie != null) { string cookieValue = cookie.Value; byte[] sessionId = FormatHelper.FromHexStringToArray(cookieValue); PartnerSessionBLL sessionBLL = new PartnerSessionBLL(WebApp.Connector); cookie.Expires = DateTime.UtcNow; Response.SetCookie(cookie); return(sessionBLL.Logout(sessionId) == PartnerSessionBLL.LogoutResult.OK ? View() as ActionResult : RedirectToAction("Login")); } else { return(RedirectToAction("Login")); } } catch { return(RedirectToAction("Login")); } }
protected override object GetEditObject() { if (_facade == null) { _facade = new Material.EquipmentFacade(base.DataProvider); } DBDateTime currentDateTime = FormatHelper.GetNowDBDateTime(this.DataProvider); Domain.Equipment.EQPMaintenance maintenance = this._facade.CreateNewEQPMaintenance(); maintenance.Eqpid = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtEQPIDEdit.Text, 40)); maintenance.MaintainITEM = FormatHelper.CleanString(this.txtMaintenanceItemEdit.Text, 400); maintenance.CycleType = this.drpCycleEdit.SelectedValue; maintenance.MaintainType = FormatHelper.CleanString(this.ddlMaintenanceTypeEdit.SelectedValue, 40); maintenance.Frequency = int.Parse(FormatHelper.CleanString(this.txtFrequencyEdit.Text, 6)); maintenance.Muser = this.GetUserCode(); maintenance.Mdate = currentDateTime.DBDate; maintenance.Mtime = currentDateTime.DBTime; return(maintenance); }
protected override DataRow GetGridRow(object obj) { DataRow row = this.DtSource.NewRow(); row["OPCode"] = ((Operation)obj).OPCode.ToString(); row["OPDescription"] = ((Operation)obj).OPDescription.ToString(); row["SelectResource"] = ""; row["SelectRoute"] = ""; bool[] opList = new OperationListFactory().CreateOperationListBooleanArray((obj as Operation).OPControl); string[] strings = new OperationListFactory().CreateOperationListColumnsHead(); for (int i = 0; i < opList.Length; i++) { row[strings[i]] = opList[i]; } row["MaintainUser"] = ((Operation)obj).GetDisplayText("MaintainUser"); row["MaintainDate"] = FormatHelper.ToDateString((obj as Operation).MaintainDate); row["MaintainTime"] = FormatHelper.ToTimeString((obj as Operation).MaintainTime); return(row); }
protected override DataRow GetGridRow(object obj) { //return new Infragistics.WebUI.UltraWebGrid.UltraGridRow( // new object[]{"false", // ((UserGroup)obj).UserGroupCode.ToString(), // ((UserGroup)obj).UserGroupType.ToString(), // ((UserGroup)obj).UserGroupDescription.ToString(), // ((UserGroup)obj).GetDisplayText("MaintainUser"), // FormatHelper.ToDateString(((UserGroup)obj).MaintainDate), // FormatHelper.ToTimeString(((UserGroup)obj).MaintainTime), // ""}); DataRow row = this.DtSource.NewRow(); row["UserGroupCode"] = ((UserGroup)obj).UserGroupCode.ToString(); row["UserGroupType"] = ((UserGroup)obj).UserGroupType.ToString(); row["UserGroupDescription"] = ((UserGroup)obj).UserGroupDescription.ToString(); row["MaintainUser"] = ((UserGroup)obj).GetDisplayText("MaintainUser"); row["MaintainDate"] = FormatHelper.ToDateString(((UserGroup)obj).MaintainDate); row["MaintainTime"] = FormatHelper.ToTimeString(((UserGroup)obj).MaintainTime); return(row); }
public DeadBand(FlightControlSystem fcs, XmlElement element) : base(fcs, element) { foreach (XmlNode currentNode in element.ChildNodes) { if (currentNode.NodeType == XmlNodeType.Element) { XmlElement currentElement = (XmlElement)currentNode; if (currentElement.LocalName.Equals("width")) { width = FormatHelper.ValueAsNumber(currentElement); } else if (currentElement.LocalName.Equals("gain")) { gain = FormatHelper.ValueAsNumber(currentElement); } } } base.Bind(); }
protected override DataRow GetGridRow(object obj) { //return new Infragistics.WebUI.UltraWebGrid.UltraGridRow( // new object[]{ // ((Domain.Equipment.EQPLog)obj).Eqpid, // FormatHelper.ToDateString(((Domain.Equipment.EQPLog)obj).Mdate), // FormatHelper.ToTimeString(((Domain.Equipment.EQPLog)obj).Mtime), // ((Domain.Equipment.EQPLog)obj).GetDisplayText("MaintainUser"), // GetStatusDesc(((Domain.Equipment.EQPLog)obj).Eqpstatus), // ((Domain.Equipment.EQPLog)obj).Memo, // }); DataRow row = this.DtSource.NewRow(); row["EQPID"] = ((Domain.Equipment.EQPLog)obj).Eqpid; row["MaintainDate"] = FormatHelper.ToDateString(((Domain.Equipment.EQPLog)obj).Mdate); row["MaintainTime"] = FormatHelper.ToTimeString(((Domain.Equipment.EQPLog)obj).Mtime); row["MaintainUser"] = ((Domain.Equipment.EQPLog)obj).GetDisplayText("MaintainUser"); row["EQPStatus"] = GetStatusDesc(((Domain.Equipment.EQPLog)obj).Eqpstatus); row["EQPMEMO"] = ((Domain.Equipment.EQPLog)obj).Memo; return(row); }
protected void cmdSAPStorageSync_ServerClick(object sender, System.EventArgs e) { if (!ValidateInput()) { return; } SAPStorageQuery query = _InventoryFacade.CreateNewSAPStorageQuery(); query.Flag = FlagStatus.FlagStatus_MES; query.OrganizationID = FormatHelper.CleanString(FormatHelper.PKCapitalFormat(this.txtFactoryQuery.Text)); query.StorageID = FormatHelper.CleanString(FormatHelper.PKCapitalFormat(this.txtStorageQuery.Text)); query.ItemCode = FormatHelper.CleanString(FormatHelper.PKCapitalFormat(this.txtItemCodeQuery.Text)); query.MaintainUser = this.GetUserCode(); _InventoryFacade.AddSAPStorageQuery(query); this.txtFactoryQuery.Text = string.Empty; this.txtStorageQuery.Text = string.Empty; this.txtItemCodeQuery.Text = string.Empty; }
public override void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services) { if (_messageId is IConstExpression message) { FormatHelper.FormatAnswers(sw, formatterContext.GetMessage(message.Int32()), _firstLine, _lastLine, _beginLine, _cancelLine); } sw.Format(formatterContext, services) .Await() .StaticType(nameof(IMessageService)) .Method(nameof(IMessageService.ShowDialog)) .Argument("channel", _channel) .Argument("messageId", _messageId) .Argument("firstLine", _firstLine) .Argument("lastLine", _lastLine) .Argument("beginLine", _beginLine) .Argument("cancelLine", _cancelLine) .Argument("posX", _pos.X) .Argument("posY", _pos.Y) .Comment(nameof(AASK)); }
private string[] FormatExportRecord(object obj) { return(new string[] { ((ReworkSheetQuery)obj).ReworkCode.ToString(), ((ReworkSheetQuery)obj).ItemCode.ToString(), ((ReworkSheetQuery)obj).ReworkQty.ToString(), ((ReworkSheetQuery)obj).ReworkRealQty.ToString(), this.languageComponent1.GetString(((ReworkSheet)obj).Status), this.languageComponent1.GetString(((ReworkSheet)obj).ReworkType), ((ReworkSheetQuery)obj).DutyCode, ((ReworkSheetQuery)obj).MaterialModelCode, ((ReworkSheetQuery)obj).BigStepSequenceCode, ((ReworkSheetQuery)obj).DDATE.ToString(), ((ReworkSheetQuery)obj).ReworkReason.ToString(), ((ReworkSheetQuery)obj).ReasonAnalyse.ToString(), ((ReworkSheetQuery)obj).Soluation.ToString(), //((ReworkSheetQuery)obj).MaintainUser.ToString(), ((ReworkSheetQuery)obj).GetDisplayText("MaintainUser"), FormatHelper.ToDateString(((ReworkSheetQuery)obj).MaintainDate), }); }
protected void Page_Load(object sender, System.EventArgs e) { this.OWCPivotTable1.LanguageComponent = this.languageComponent1; this.txtItemCodeQuery.Target = this.MakeRedirectUrl("FItemSP.aspx"); this.txtMoCodeQuery.Target = this.MakeRedirectUrl("FMOSP.aspx"); if (!this.IsPostBack) { // 初始化页面语言 this.InitPageLanguage(this.languageComponent1, false); this.dateStartDateQuery.Text = FormatHelper.ToDateString(FormatHelper.TODateInt(System.DateTime.Now)); this.dateEndDateQuery.Text = this.dateStartDateQuery.Text; RadioButtonListBuilder builder3 = new RadioButtonListBuilder( new VisibleStyle(), this.rblVisibleStyle, this.languageComponent1); builder3.Build(); OWCChartSpace1.Display = false; } }
protected override int GetUnSelectedRowCount() { if (facade == null) { facade = new FacadeFactory(base.DataProvider).CreateSPFacade(); } if (this.GetRequestParam("frompage") == "FOnWipQP") { return(this.facade.QueryUnSelectedMOByItemCodeCount( FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCodeQuery.Text)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMOCodeQuery.Text)), MOManufactureStatus.MOSTATUS_OPEN + "," + MOManufactureStatus.MOSTATUS_PENDING, new string[0])); } return(this.facade.QueryUnSelectedMOCount( FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtModelCodeQuery.Text)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCodeQuery.Text)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMOCodeQuery.Text)), new string[0])); }
public override bool TableExists(string schemaName, string tableName) { if (tableName == null) { throw new ArgumentNullException(nameof(tableName)); } if (tableName.Length == 0) { return(false); } if (string.IsNullOrEmpty(schemaName)) { return(Exists("SELECT 1 FROM USER_TABLES WHERE upper(TABLE_NAME) = '{0}'", FormatHelper.FormatSqlEscape(tableName.ToUpper()))); } return(Exists("SELECT 1 FROM ALL_TABLES WHERE upper(OWNER) = '{0}' AND upper(TABLE_NAME) = '{1}'", schemaName.ToUpper(), FormatHelper.FormatSqlEscape(tableName.ToUpper()))); }
/// <summary> /// 获取当前需要处理的实体,新增和保存时均会调用 /// </summary> /// <returns>需要处理的object</returns> protected override object GetEditObject() { if (m_ItemLotFacade == null) { m_ItemLotFacade = new ItemLotFacade(this.DataProvider); } Item2LotCheck item2LotCheck = this.m_ItemLotFacade.CreateNewItem2LotCheck(); item2LotCheck.ItemCode = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCode.Text, 40)); item2LotCheck.SNPrefix = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtSNPrefix.Text, 40)); if (this.txtSNLength.Text.Trim().Length > 0) { item2LotCheck.SNLength = int.Parse(this.txtSNLength.Text); } item2LotCheck.CreateType = this.RadioButtonListCreateTypeEdit.SelectedValue; item2LotCheck.SNContentCheck = this.chkSNContentCheck.Checked ? SNContentCheckStatus.SNContentCheckStatus_Need : SNContentCheckStatus.SNContentCheckStatus_NONeed; item2LotCheck.MUser = this.GetUserCode(); return(item2LotCheck); }
private void _helper_DomainObjectToExportRow(object sender, EventArgs e) { if ((e as DomainObjectToExportRowEventArgs).DomainObject != null) { QDOTSDetails1 obj = (e as DomainObjectToExportRowEventArgs).DomainObject as QDOTSDetails1; (e as DomainObjectToExportRowEventArgs).ExportRow = new string[] { obj.ErrorCodeGroupDescription, obj.ErrorCodeDescription, obj.ErrorCauseDescription, obj.ErrorLocation, obj.ErrorParts, obj.SolutionDescription, obj.DutyDescription, obj.Memo, obj.TSOperator, FormatHelper.ToDateString(obj.TSDate), FormatHelper.ToTimeString(obj.TSTime) }; } }
protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj) { return(new Infragistics.WebUI.UltraWebGrid.UltraGridRow( new object[] { "false", FormatHelper.ToDateString(((WorkPlanWithQty)obj).PlanDate), ((WorkPlanWithQty)obj).BigSSCode.ToString(), ((WorkPlanWithQty)obj).PlanSeq.ToString(), ((WorkPlanWithQty)obj).MoCode.ToString(), ((WorkPlanWithQty)obj).MoSeq.ToString(), ((WorkPlanWithQty)obj).ItemCode.ToString(), ((WorkPlanWithQty)obj).MaterialModelCode.ToString(), FormatHelper.ToTimeString(((WorkPlanWithQty)obj).PlanStartTime), ((WorkPlanWithQty)obj).PlanQty.ToString(), ((WorkPlanWithQty)obj).ActQty.ToString(), this.languageComponent1.GetString(((WorkPlanWithQty)obj).ActionStatus.ToString()), this.languageComponent1.GetString(((WorkPlanWithQty)obj).MaterialStatus.ToString()), FormatHelper.ToTimeString(((WorkPlanWithQty)obj).LastReceiveTime), FormatHelper.ToTimeString(((WorkPlanWithQty)obj).LastReqTime), FormatHelper.ToTimeString(((WorkPlanWithQty)obj).PromiseTime), "" })); }
private void GetInstaceInfo(string name, JsonFileItem jfi) { try { var strs = name.Split('_'); jfi.Release = strs[1]; jfi.InstanceName = strs[2]; if (strs.Length == 3) { jfi.Number = FormatHelper.GetLastNumber(strs[2]).ToString(); jfi.InstanceName= FormatHelper.GetExecptNumber(strs[2]).ToString(); } if (strs.Length >= 4) jfi.Number = strs[3]; } catch { } }
// 2005-04-06 protected override string[] FormatExportRecord(object obj) { return(new string[] { ((RMADetial)obj).Modelcode, ((RMADetial)obj).Itemcode, ((RMADetial)obj).Rcard, ((RMADetial)obj).Servercode, ((RMADetial)obj).Customcode, ((RMADetial)obj).Comfrom, this.languageComponent1.GetString(((RMADetial)obj).Handelcode), ((RMADetial)obj).Maintenance.ToString(), FormatHelper.ToDateString(((RMADetial)obj).Whreceivedate), ((RMADetial)obj).Subcompany, ((RMADetial)obj).Remocode, ((RMADetial)obj).Errorcode, ((RMADetial)obj).Compissue, this.languageComponent1.GetString(((RMADetial)obj).Isinshelflife), ((RMADetial)obj).Memo, ((RMADetial)obj).GetDisplayText("MaintainUser"), FormatHelper.ToDateString(((RMADetial)obj).Mdate), FormatHelper.ToTimeString(((RMADetial)obj).Mtime) }); }
private static VertexElement[] CalculateStaticOffsets(VertexElement[] vertexElements) { int offset = 0; for (int i = 0; i < vertexElements.Length; i++) { // If offset is not specified, use the current offset if (vertexElements[i].AlignedByteOffset == -1) { vertexElements[i].alignedByteOffset = offset; } else { offset = vertexElements[i].AlignedByteOffset; } // Move to the next field. offset += FormatHelper.SizeOfInBits(vertexElements[i].Format); } return(vertexElements); }
private void _helper_DomainObjectToExportRow(object sender, EventArgs e) { if ((e as DomainObjectToExportRowEventArgs).DomainObject != null) { QDOKeyparts obj = (e as DomainObjectToExportRowEventArgs).DomainObject as QDOKeyparts; (e as DomainObjectToExportRowEventArgs).ExportRow = new string[] { obj.MoCode, obj.ItemCode, obj.SN, obj.OperationCode, obj.StepSequenceCode, obj.ResourceCode, obj.MItemCode, obj.MaintainUser, FormatHelper.ToDateString(obj.MaintainDate), FormatHelper.ToTimeString(obj.MaintainTime), obj.INNO }; } }
private object[] LoadDataSource(int inclusive, int exclusive) { if (_modelFacade == null) { _modelFacade = new SMTFacadeFactory(base.DataProvider).CreateMOFacade(); } // return this._modelFacade.QueryMOIllegibility( // FormatHelper.PKCapitalFormat( FormatHelper.CleanString( this.txtMoCodeQuery.Text )), // FormatHelper.PKCapitalFormat( FormatHelper.CleanString( this.txtItemCodeQuery.Text )), // string.Empty, // FormatHelper.CleanString( this.drpMoStatusQuery.SelectedValue ), // string.Empty,string.Empty, // inclusive, exclusive ); return(this._modelFacade.QueryMOIllegibility( FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMoCodeQuery.Text)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCodeQuery.Text)), string.Empty, this.getSelectMOStatus(), string.Empty, string.Empty, inclusive, exclusive)); }
protected void Page_Load(object sender, System.EventArgs e) { this._gridHelper = new GridHelper(this.gridWebGrid); this._helper = new WebQueryHelper(this.cmdQuery, this.cmdGridExport, this.gridWebGrid, this.pagerSizeSelector, this.pagerToolBar, this.languageComponent1); this._helper.LoadGridDataSource += new EventHandler(_helper_LoadGridDataSource); this._helper.DomainObjectToGridRow += new EventHandler(_helper_DomainObjectToGridRow); this._helper.DomainObjectToExportRow += new EventHandler(_helper_DomainObjectToExportRow); this._helper.GetExportHeadText += new EventHandler(_helper_GetExportHeadText); this._helper.GridCellClick += new EventHandler(_helper_GridCellClick); FormatHelper.SetSNRangeValue(txtStartSnQuery, txtEndSnQuery); FormatHelper.SetSNRangeValue(txtStartKeypartsQuery, txtEndKeypartsQuery); if (!this.IsPostBack) { // 初始化页面语言 this.InitPageLanguage(this.languageComponent1, false); this._initialWebGrid(); } }
protected override void Print(HealthStatus item) { if (!item.HasRegisteredChecks) { QueueAdd(FormatHelper.SectionName("No HealthChecks registered.", ContextName)); return; } var result = item.IsHealthy ? "OK" : "NOK"; QueueAdd(FormatHelper.SectionName("HealthStatus", ContextName)); QueueAdd("Status", result); foreach (var s in item.Results) { result = s.Check.IsHealthy ? "OK" : "NOK"; var msg = string.IsNullOrEmpty(s.Check.Message) ? string.Empty : $"({s.Check.Message})"; QueueAdd($"{s.Name} => Status: {result}. {msg}"); } QueueAdd(string.Empty); }
protected override string[] FormatExportRecord(object obj) { return(new string[] { ((ItemTracingQuery)obj).RCard.ToString(), ((ItemTracingQuery)obj).MOCode.ToString(), ((ItemTracingQuery)obj).MaterialModelCode.ToString(), ((ItemTracingQuery)obj).ItemCode.ToString(), ((ItemTracingQuery)obj).BigStepSequenceCode.ToString(), this.languageComponent1.GetString(((ItemTracingQuery)obj).ItemStatus.ToString()), ((ItemTracingQuery)obj).OPCode.ToString(), WebQueryHelper.GetOPResultLinkText(this.languageComponent1, ((ItemTracingQuery)obj).OPType), ((ItemTracingQuery)obj).RouteCode.ToString(), ((ItemTracingQuery)obj).SegmentCode.ToString(), ((ItemTracingQuery)obj).LineCode.ToString(), ((ItemTracingQuery)obj).ResCode.ToString(), FormatHelper.ToDateString(((ItemTracingQuery)obj).MaintainDate), FormatHelper.ToTimeString(((ItemTracingQuery)obj).MaintainTime), ((ItemTracingQuery)obj).MaintainUser.ToString() } ); }
protected override object[] LoadDataSource(int inclusive, int exclusive) { int date = 0; try { date = FormatHelper.TODateInt(this.datDateQuery.Date_DateTime); } catch { } object[] dataSource = _InventoryFacade.QueryProductInvPeriod( FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtStorageAttributeQuery.Text)), date, inclusive, exclusive); ProcessDataDourceToGrid(ref dataSource); ProcessOWC(dataSource); return(dataSource); }
private void SetEditObject(object obj) { if (orderFacade == null) { orderFacade = new FacadeFactory(base.DataProvider).CreateOrderFacade(); } if (obj == null) { this.txtOrderCodeEdit.Text = string.Empty; this.txtPlanShipDateEdit.Text = FormatHelper.ToDateString(FormatHelper.TODateInt(DateTime.Now)); this.txtActShipDateEdit.Text = FormatHelper.ToDateString(FormatHelper.TODateInt(DateTime.MaxValue)); this.txtActShipDateEdit.Enable = "false"; return; } this.txtOrderCodeEdit.Text = (obj as Order).OrderNumber; this.txtPlanShipDateEdit.Text = FormatHelper.ToDateString((obj as Order).PlanShipDate); this.txtActShipDateEdit.Text = FormatHelper.ToDateString((obj as Order).ActShipDate); this.txtActShipDateEdit.Enable = "false"; this.drpOrderStatusEdit.SelectedValue = (obj as Order).OrderStatus; }