/// <summary> /// <description>Function to Create Medication Grid at run time by creating dynamic table</description> /// <author>Ankesh Bharti</author> /// <createdDate>24/12/2008</createdDate> /// </summary> private void CreateControls() { try { CommonFunctions.Event_Trap(this); CreateLabelRow(); Table tableControls = new Table(); tableControls.Width = new Unit(90, UnitType.Percentage); tableControls.ID = "tableMedicationStepBuilder"; tableControls.Attributes.Add("tableMedicationStepBuilder", "true"); string myscript = "<script id='MedicationOrderScript' type='text/javascript'>"; myscript += "function InitializeComponents(){;"; for (int _RowCount = 0; _RowCount < 5; _RowCount++) { tableControls.Rows.Add(CreateMedicationRow(_RowCount, ref myscript)); } myscript += "}</script>"; PlaceHolder.Controls.Add(tableControls); ScriptManager.RegisterStartupScript(PlaceHolder, PlaceHolder.GetType(), PlaceHolder.ClientID.ToString(), myscript, false); } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) ex.Data["CustomExceptionInformation"] = ""; else ex.Data["CustomExceptionInformation"] = ""; if (ex.Data["DatasetInfo"] == null) ex.Data["DatasetInfo"] = ""; Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this); } }
public void createControls() { try { CommonFunctions.Event_Trap(this); _dsVerbalOrder = objClientMedication.GetVerbalOrderReviewData(((Streamline.BaseLayer.StreamlineIdentity)Context.User.Identity).UserId, Session["OpenVerbalOrder"].ToString()); Session["dsVerbalOrder"] = _dsVerbalOrder; CreateLabelRow(); Table tableControls = new Table(); tableControls.Width = new Unit(100, UnitType.Percentage); tableControls.ID = "tableApprovedOrders"; tableControls.Attributes.Add("tableApprovedOrders", "true"); string myscript = "<script type='text/javascript'>"; myscript += "function InitializeComponents(){;"; //DataView dataViewVerbalOrder = _dsVerbalOrder.Tables[0].DefaultView; //dataViewVerbalOrder.Sort = "ClientMedicationScriptId asc"; var rowClass = "GridViewRowStyle"; for (int _RowCount = 0; _RowCount < _dsVerbalOrder.Tables[0].Rows.Count; _RowCount++) { tableControls.Rows.Add(CreateOrderRow(_dsVerbalOrder.Tables[0].Rows[_RowCount], _RowCount, ref myscript, rowClass)); rowClass = rowClass == "GridViewRowStyle" ? "GridViewAlternatingRowStyle" : "GridViewRowStyle"; } myscript += "}</script>"; tableControls.CellPadding = 0; tableControls.CellSpacing = 0; PlaceHolder.Controls.Add(tableControls); ScriptManager.RegisterStartupScript(PlaceHolder, PlaceHolder.GetType(), PlaceHolder.ClientID.ToString(), myscript, false); HiddenFieldSign.Value = "false"; } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) { ex.Data["CustomExceptionInformation"] = ""; } else { ex.Data["CustomExceptionInformation"] = ""; } if (ex.Data["DatasetInfo"] == null) { ex.Data["DatasetInfo"] = ""; } Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this); } finally { } }