protected DataRow GetGridRow(object obj) { AlertNotice model = (AlertNotice)obj; //return new UltraGridRow( // new object[]{ // "false", // model.Serial, // this.languageComponent1.GetString(model.AlertType), // model.ItemSequence, // model.NoticeContent, // this.languageComponent1.GetString(model.Status) // //Added By Nettie Chen 2009/09/22 // ,model.DealUser // ,FormatHelper.ToDateString(model.DealDate) // ,FormatHelper.ToTimeString(model.DealTime) // //End Added // }); DataRow row = this.DtSource.NewRow(); row["SERIAL"] = model.Serial; row["AlertItemType"] = this.languageComponent1.GetString(model.AlertType); row["AlertItem"] = model.ItemSequence; row["AlertNotice"] = model.NoticeContent; row["Status"] = this.languageComponent1.GetString(model.Status); row["DealUser"] = model.DealUser; row["DealDate"] = FormatHelper.ToDateString(model.DealDate); row["DealTime"] = FormatHelper.ToTimeString(model.DealTime); return(row); }
private void DoQuery() { WatchPanelFacade watchPanelFacade = new WatchPanelFacade(this.DataProvider); DBDateTime now = FormatHelper.GetNowDBDateTime(this.DataProvider); //Alert Notice Label labelAlertNotice = new Label(); labelAlertNotice.Text = string.Empty; object[] alertNoticeArray = watchPanelFacade.QueryAlertNoticeList(now.DBDate); if (alertNoticeArray != null) { for (int i = 0; i < alertNoticeArray.Length; i++) { AlertNotice alertNotice = (AlertNotice)alertNoticeArray[i]; if (labelAlertNotice.Text.Trim().Length > 0) { labelAlertNotice.Text += "<br>"; } int seq = i + 1; labelAlertNotice.Text += seq.ToString() + ": "; labelAlertNotice.Text += alertNotice.NoticeContent; } } this.PanelAlertNotice.Controls.Add(labelAlertNotice); }
protected void cmdSaveReturn_ServerClick(object sender, System.EventArgs e) { if (this.txtReasonAnalysis.Text.Trim() == string.Empty && this.txtMeasureMethod.Text.Trim() == string.Empty) { this.Response.Redirect(this.MakeRedirectUrl("./FAlertNoticeMP.aspx")); } else { if (!SaveCheck()) { return; } AlertNotice notice = (AlertNotice)this._AlertFacade.GetAlertNotice(int.Parse(Request["SERIAL"])); notice.Status = AlertNoticeStatus.AlertNoticeStatus_HasDeal; //Modified By Nettie Chen 2009/09/22 //notice.DealDate = FormatHelper.TODateInt(DateTime.Now.ToShortDateString()); //notice.DealTime = FormatHelper.TOTimeInt(DateTime.Now); DBDateTime dbDateTime = FormatHelper.GetNowDBDateTime(this.DataProvider); notice.DealDate = dbDateTime.DBDate; notice.DealTime = dbDateTime.DBTime; //End Modified notice.DealUser = this.GetUserCode(); notice.AnalysisReason = this.txtReasonAnalysis.Text.Trim(); notice.DealMethods = this.txtMeasureMethod.Text.Trim(); ArrayList noticeArray = new ArrayList(); noticeArray.Add(notice); this._AlertFacade.QuickDealAlertNotice((AlertNotice[])noticeArray.ToArray(typeof(AlertNotice))); this.Response.Redirect(this.MakeRedirectUrl("./FAlertNoticeMP.aspx")); } }
private void InitNoticeInfo() { AlertNotice notice = (AlertNotice)this._AlertFacade.GetAlertNotice(int.Parse(Request["SERIAL"])); this.txtAlertItemType.Text = this._LanguageComponent1.GetString(notice.AlertType); this.txtAlertItemSequence.Text = notice.ItemSequence; this.txtAlertItemDesc.Text = notice.Description; this.txtAlertNotice.Text = notice.NoticeContent; this.txtReasonAnalysis.Text = notice.AnalysisReason; this.txtMeasureMethod.Text = notice.DealMethods; }
private string[] FormatExportRecord(object obj) { AlertNotice model = (AlertNotice)obj; return(new string[] { this.languageComponent1.GetString(model.AlertType), model.ItemSequence, model.NoticeContent, this.languageComponent1.GetString(model.Status) //Added By Nettie Chen 2009/09/22 , model.DealUser , FormatHelper.ToDateString(model.DealDate) , FormatHelper.ToTimeString(model.DealTime) //End Added }); }
protected void cmdQuickDeal_ServerClick(object sender, System.EventArgs e) { ArrayList rowArray = this.gridHelper.GetCheckedRows(); if (rowArray != null && rowArray.Count > 0) { ArrayList modelArray = new ArrayList(); foreach (GridRecord row in rowArray) { AlertNotice model = (AlertNotice)GetEditObject(row); if (model != null) { if (model.Status == AlertNoticeStatus.AlertNoticeStatus_NotDeal) { model.Status = AlertNoticeStatus.AlertNoticeStatus_HasDeal; model.DealDate = FormatHelper.TODateInt(DateTime.Now.ToShortDateString()); model.DealTime = FormatHelper.TOTimeInt(DateTime.Now); model.DealUser = this.GetUserCode(); modelArray.Add(model); } } } if (modelArray.Count > 0) { this._AlertFacade.QuickDealAlertNotice((AlertNotice[])modelArray.ToArray(typeof(AlertNotice))); } this.RequestData(); } else { WebInfoPublish.Publish(this, "$CS_GRID_SELECT_ONE_RECORD", this.languageComponent1); } }