/// <summary> /// method /// loads the values from the data row into the grid view row controls /// </summary> /// <param name="gvr"></param> protected void LoadGridViewRowValues(GridViewRow gvr) { DataRowView drv = (DataRowView)gvr.DataItem; if (drv == null) { return; } DataRow dr = drv.Row; if (dr == null) { return; } Button btnStates = (Button)gvr.FindControl("btnStates"); CheckBox chkItemActive = (CheckBox)gvr.FindControl("chkItemActive"); TextBox txtTSTimePeriod = (TextBox)gvr.FindControl("txtTSTimePeriod"); DropDownList ddlUnit = (DropDownList)gvr.FindControl("ddlUnit"); TextBox txtSortOrder = (TextBox)gvr.FindControl("txtSortOrder"); Label lblItemLabel = (Label)gvr.FindControl("lblItemLabel"); CheckBoxList cblDSChangeable = (CheckBoxList)gvr.FindControl("cblDSChangeable"); if (btnStates == null || chkItemActive == null || txtTSTimePeriod == null || ddlUnit == null || txtSortOrder == null || lblItemLabel == null || cblDSChangeable == null) { return; } btnStates.Attributes.Add("ITEM_ID", dr["ITEM_ID"].ToString()); btnStates.Enabled = (Convert.ToInt32(dr["CHECKLIST_ID"]) < 1) ? false : true; chkItemActive.Checked = (Convert.ToInt64(dr["ACTIVE_ID"]) == (long)k_ACTIVE_ID.Active) ? true : false; txtTSTimePeriod.Text = dr["CLI_TS_TIME_PERIOD"].ToString(); ddlUnit.SelectedValue = dr["TIME_UNIT_ID"].ToString(); txtSortOrder.Text = dr["SORT_ORDER"].ToString(); lblItemLabel.Text = dr["ITEM_LABEL"].ToString(); DataRow[] draDSSelect = DSChangeable.Select("ITEM_ID = " + dr["ITEM_ID"].ToString()); CCheckBoxList cbl = new CCheckBoxList(); cbl.CheckSelected(cblDSChangeable, draDSSelect); }
/////////////////////////////////////////////////////////////////// //gender public void LoadGenderCheckList(BaseMaster BaseMstr, CheckBoxList chklst) { //get the data to load DataSet ds = GetGenderDS(BaseMstr); //load the combo CCheckBoxList cl = new CCheckBoxList(); cl.RenderDataSet(BaseMstr, ds, chklst, "GENDER_DESC", "GENDER_ID"); }
//load a check list of majcoms public void LoadMAJCOMCheckList(BaseMaster BaseMstr, CheckBoxList chklst) { //get the data to load DataSet ds = m_Military.GetMAJCOMDS(BaseMstr); //load the combo CCheckBoxList cl = new CCheckBoxList(); cl.RenderDataSet(BaseMstr, ds, chklst, "MAJCOM_TITLE", "MAJCOM_ID"); }
//marital status public void LoadMaritalStatusCheckList(BaseMaster BaseMstr, CheckBoxList chklst) { //get the data to load DataSet ds = m_Military.GetMaritalStatusDS(BaseMstr); //load the combo CCheckBoxList cl = new CCheckBoxList(); cl.RenderDataSet(BaseMstr, ds, chklst, "MARITAL_STATUS_TITLE", "MARITAL_STATUS_ID"); }
//Load the Rank grade CheckBox list public void LoadRankCheckList(BaseMaster BaseMstr, CheckBoxList chklst) { //get the data to load DataSet ds = m_Military.GetRankDS(BaseMstr); //load the combo CCheckBoxList cl = new CCheckBoxList(); cl.RenderDataSet(BaseMstr, ds, chklst, "GRADE", "RANK_ID"); }
//fmp public void LoadFMPGroupCheckList(BaseMaster BaseMstr, CheckBoxList chklst) { //get the data to load DataSet ds = m_Military.GetFMPGroupDS(BaseMstr); //load the combo CCheckBoxList cl = new CCheckBoxList(); cl.RenderDataSet(BaseMstr, ds, chklst, "GROUP_NAME", "GROUP_ID"); }
public void LoadMilServiceCheckList(BaseMaster BaseMstr, CheckBoxList chklst) { //get the data to load DataSet ds = m_Military.GetMilitaryServiceDS(BaseMstr); //load the combo CCheckBoxList cl = new CCheckBoxList(); cl.RenderDataSet(BaseMstr, ds, chklst, "MILITARY_SERVICE_TITLE", "MILITARY_SERVICE_ID"); }
/////////////////////////////////////////////////////////////////// //afsc public void LoadAFSCCheckList(BaseMaster BaseMstr, CheckBoxList chklst) { //get the data to load DataSet ds = m_Military.GetAFSCDS(BaseMstr); //load the combo CCheckBoxList cl = new CCheckBoxList(); cl.RenderDataSet(BaseMstr, ds, chklst, "DUTY_SPECIALTY,DESCRIPTION", "DUTY_SPECIALTY_ID"); }
//fmp public void LoadFMPCheckList(BaseMaster BaseMstr, CheckBoxList chklst) { //get the data to load DataSet ds = m_Military.GetFMPDS(BaseMstr); //load the combo CCheckBoxList cl = new CCheckBoxList(); cl.RenderDataSet(BaseMstr, ds, chklst, "FMP_TITLE,FMP_DESCRIPTION", "FMP_ID"); }
//load a checkbox list of User Rights public void LoadUserRightsCheckboxList(BaseMaster BaseMstr, CheckBoxList chklst) { //get the data to load DataSet ds = GetUserRightsDS(BaseMstr); //load the combo CCheckBoxList cl = new CCheckBoxList(); cl.RenderDataSet(BaseMstr, ds, chklst, "RIGHT_DESC", "RIGHT_DEC" ); }
//load a dropdown list of military services public void LoadMAJCOMBaseCheckList(BaseMaster BaseMstr, CheckBoxList chklst, long lMAJCOMID) { //get the data to load DataSet ds = m_Military.GetMAJCOMBaseDS(BaseMstr, lMAJCOMID); //load the combo CCheckBoxList cl = new CCheckBoxList(); cl.RenderDataSet(BaseMstr, ds, chklst, "BASE", "DIMS_ID"); }
//load a check list of Intake Modules public void LoadIntakeCheckList(BaseMaster BaseMstr, CheckBoxList chklst, string strSelectedID) { //get the data to load DataSet ds = GetIntakeModulesDS(BaseMstr); //load the combo CCheckBoxList cl = new CCheckBoxList(); cl.RenderDataSet(BaseMstr, ds, chklst, "MODULE", "MID"); }
//load a dropdown list of military services public void LoadDMISSquadronCheckList(BaseMaster BaseMstr, CheckBoxList lst, string strDMISID) { //get the data to load DataSet ds = m_Military.GetDMISSquadronDS(BaseMstr, strDMISID); //load the combo CCheckBoxList l = new CCheckBoxList(); l.RenderDataSet(BaseMstr, ds, lst, "SQUADRON", "SQUADRON_ID"); }
/// <summary> /// click tiu note uncheck read only /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void cblTIUNote_SelectedIndexChanged(object sender, EventArgs e) { CCheckBoxList cbl = new CCheckBoxList(); int nIndex = cbl.GetIndexJustSelected(Request, cblTIUNote); if (nIndex != -1) { //0 = administrator //1 = doctor //2 = nurse // if (cblTIUNote.Items[nIndex].Selected) { cblReadOnly.Items[nIndex].Selected = false; cblViewable.Items[nIndex].Selected = true; } } }
public bool LoadTemplateEdit(BaseMaster BaseMstr, long lTemplateID, TextBox txtName, DropDownList cboGroup, TextBox txtTemplate) { txtName.Text = ""; cboGroup.SelectedIndex = -1; txtTemplate.Text = ""; if (lTemplateID < 1) { txtName.Focus(); return(true); } CCheckBoxList lst = new CCheckBoxList(); CDropDownList cbo = new CDropDownList(); DataSet ds = GetTemplateDS(BaseMstr); foreach (DataTable table in ds.Tables) { foreach (DataRow row in table.Rows) { if (!row.IsNull("TEMPLATE_ID")) { long lID = Convert.ToInt32(row["TEMPLATE_ID"]); if (lID == lTemplateID) { if (!row.IsNull("TEMPLATE")) { txtTemplate.Text = Convert.ToString(row["TEMPLATE"]).Replace("<", "[").Replace(">", "]"); txtName.Text = Convert.ToString(row["DESCRIPTION"]); cbo.SelectValue(cboGroup, Convert.ToInt32(row["TYPE_ID"])); return(true); } } } } } return(true); }
/// <summary> /// if the user picks the ReadOnly option then they can't close /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void cblReadOnly_SelectedIndexChanged(object sender, EventArgs e) { CCheckBoxList cbl = new CCheckBoxList(); int nIndex = cbl.GetIndexJustSelected(Request, cblReadOnly); if (nIndex != -1) { //0 = administrator //1 = doctor //2 = nurse // //read only can't close it or write a note... // if (cblReadOnly.Items[nIndex].Selected) { cblCloseable.Items[nIndex].Selected = false; cblTIUNote.Items[nIndex].Selected = false; // //read only viewable is true cblViewable.Items[nIndex].Selected = true; } } }
/// <summary> /// US:1951 US:1945 method /// loads checklist data from the database into the checklist's controls /// </summary> /// <param name="lStatusCode"></param> /// <param name="strStatusComment"></param> /// <returns></returns> protected CStatus LoadChecklist() { CChecklistData cld = new CChecklistData(BaseMstr.BaseData); CChecklistDataItem clData = null; CStatus status = cld.GetCheckListDI(ChecklistID, out clData); if (!status.Status) { return(status); } ChecklistID = clData.ChecklistID; txtCLLabel.Text = clData.ChecklistLabel; txtCLNoteTitle.Text = clData.NoteTitleTag; if (txtCLNoteTitle.Text == "-1") { txtCLNoteTitle.Text = ""; } chkActive.Checked = (clData.ActiveID == k_ACTIVE_ID.Active) ? true : false; txtCLDesc.Text = clData.ChecklistDescription; try { ddlClinics.SelectedValue = Convert.ToString(clData.NoteTitleClinicID); } catch (Exception) { ddlClinics.SelectedIndex = -1; } try { ddlCLService.SelectedValue = Convert.ToString(clData.ServiceID); } catch (Exception) { ddlCLService.SelectedIndex = -1; } DataSet dsViewable = null; status = cld.GetCLViewableRolesDS(ChecklistID, out dsViewable); if (!status.Status) { return(status); } CCheckBoxList cbl = new CCheckBoxList(); cbl.CheckSelected(cblViewable, dsViewable); DataSet dsReadOnly = null; status = cld.GetCLReadOnlyRolesDS(ChecklistID, out dsReadOnly); if (!status.Status) { return(status); } cbl.CheckSelected(cblReadOnly, dsReadOnly); DataSet dsCloseable = null; status = cld.GetCLCloseableRolesDS(ChecklistID, out dsCloseable); if (!status.Status) { return(status); } cbl.CheckSelected(cblCloseable, dsCloseable); DataSet dsTIU = null; status = cld.GetCLTIURolesDS(ChecklistID, out dsTIU); if (!status.Status) { return(status); } cbl.CheckSelected(cblTIUNote, dsTIU); return(new CStatus()); }