/// <summary> /// Gets the Stoppage Event Details as Typed Dataset from DB /// </summary> /// <param name="eventId">the event id</param> /// <returns>Typed Dataset</returns> public static StoppageEventData F8016_GetStoppageEventDetails(int eventId) { StoppageEventData stoppageEventData = new StoppageEventData(); Hashtable ht = new Hashtable(); ht.Add("@EventID", eventId); Utility.LoadDataSet(stoppageEventData.GetEventStoppage, "f8106_pcget_FS_EventTypeStoppage", ht); return(stoppageEventData); }
/// <summary> /// Saves inot DB the Stoppage Event Details /// </summary> /// <param name="eventItems">Items to be inserted into the table are passed as an XML of type string</param> /// <param name="userId">userId</param> /// <returns>Typed DataSet</returns> public static StoppageEventData F8016_SaveStoppageEventDetails(string eventItems, int userId) { StoppageEventData stoppageEventData = new StoppageEventData(); Hashtable ht = new Hashtable(); ht.Add("@EventItems", eventItems); ht.Add("@UserID", userId); Utility.LoadDataSet(stoppageEventData.SaveEventStoppage, "f8106_pcupd_FS_EventTypeStoppage", ht); return(stoppageEventData); }
/// <summary> /// Gets the Details of the Stoppage Event (GDoc Footer) and assigns to the controls /// </summary> private void F8106_GetStoppageEventDetails() { bool damageCheck = false; bool picturesCheck = false; this.Cursor = Cursors.WaitCursor; this.stoppageEventData = this.form8106Control.WorkItem.F8106_GetStoppageEventDetails(this.keyID); if (this.stoppageEventData.GetEventStoppage.Rows.Count > 0) { this.RiskManagerDateTextBox.Text = this.stoppageEventData.GetEventStoppage.Rows[0][this.stoppageEventData.GetEventStoppage.RManagerDateColumn].ToString(); damageCheck = Convert.ToBoolean(this.stoppageEventData.GetEventStoppage.Rows[0][this.stoppageEventData.GetEventStoppage.DamageColumn]); picturesCheck = Convert.ToBoolean(this.stoppageEventData.GetEventStoppage.Rows[0][this.stoppageEventData.GetEventStoppage.PictureColumn]); this.AssignCheckBoxValue(DamageCheckBox, damageCheck); this.AssignCheckBoxValue(PicturesCheckBox, picturesCheck); } else { this.ShowControls(false); this.ShowPanel(false); } this.Cursor = Cursors.Default; }