protected void trvOfficePermissions_SelectedNodeChanged(object sender, EventArgs e) { cblOffices.ClearSelection(); cblOffices.Items.Clear(); if (null != ViewState["TempRoles"]) { TempRoles = (Dictionary <string, Dictionary <string, Dictionary <Guid, string> > >)ViewState["TempRoles"]; } TreeNode SelectedNode = trvOfficePermissions.SelectedNode; if (SelectedNode.ChildNodes.Count == 0) { cblOffices.DataBind(); string module = SelectedNode.Parent.Value; string mode = SelectedNode.Value; if (TempRoles[module].ContainsKey(mode)) { Dictionary <Guid, string> Offices = TempRoles[module][mode]; foreach (Guid OfficeId in Offices.Keys) { cblOffices.Items.FindByValue(OfficeId.ToString()).Selected = true; } } } }
public override string ToString() { var sb = new StringBuilder(); sb.Append("ElectionYear = "); sb.AppendLine(ElectionYear.ToString()); sb.Append("Party = "); sb.AppendLine(Party.ToString()); sb.Append("OfficeType = "); sb.AppendLine(OfficeType.ToString()); sb.Append("OfficeId = "); sb.AppendLine(OfficeId.ToString()); sb.Append("Flow"); sb.AppendLine(Flow.ToString()); sb.AppendLine("--"); return(sb.ToString()); }
private void BindGrid() { string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url); using (Utils utility = new Utils()) { utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod()); } _BillingCompany = new Bill_Sys_BillingCompanyDetails_BO(); DataSet ds = new DataSet(); DataTable OBJDTSum = new DataTable(); DataRow objDRSum; string Office_Id = ""; try { DataTable objDSOfficeWise = new DataTable(); ds = _BillingCompany.GetOfficeWisePatientInfo(txtCompanyID.Text, StartDate.ToString(), EndDate.ToString(), OfficeId.ToString(), DocorId.ToString(), Status.ToString()); objDSOfficeWise = DisplayOfficeInGrid(ds); grdAllReports.DataSource = objDSOfficeWise; grdAllReports.DataBind(); //Code To Fill Second Grid OBJDTSum.Columns.Add("SZ_OFFICE"); OBJDTSum.Columns.Add("SZ_PATIENT_NAME"); OBJDTSum.Columns.Add("SZ_DOCTOR_NAME"); OBJDTSum.Columns.Add("DT_EVENT_DATE"); OBJDTSum.Columns.Add("SZ_INSURANCE_NAME"); OBJDTSum.Columns.Add("SZ_OFFICE_STATE"); OBJDTSum.Columns.Add("SZ_OFFICE_ZIP"); for (int i = 0; i < grdAllReports.Items.Count; i++) { string str = grdAllReports.Items[i].Cells[5].Text.ToString(); if (grdAllReports.Items[i].Cells[5].Text.ToString() == " " && grdAllReports.Items[i].Cells[3].Text.ToString() == " ") { Office_Id = grdAllReports.Items[i].Cells[0].Text.ToString(); } if (grdAllReports.Items[i].Cells[4].Text.ToString() == " " && str.Substring(0, 4) == "<b>T") { objDRSum = OBJDTSum.NewRow(); objDRSum["SZ_OFFICE"] = Office_Id.ToString(); objDRSum["SZ_PATIENT_NAME"] = grdAllReports.Items[i].Cells[0].Text.ToString(); objDRSum["SZ_DOCTOR_NAME"] = grdAllReports.Items[i].Cells[1].Text.ToString(); objDRSum["DT_EVENT_DATE"] = grdAllReports.Items[i].Cells[2].Text.ToString(); objDRSum["SZ_INSURANCE_NAME"] = grdAllReports.Items[i].Cells[3].Text.ToString(); //objDRSum["SZ_OFFICE_STATE"] = grdAllReports.Items[i].Cells[4].Text.ToString(); objDRSum["SZ_OFFICE_ZIP"] = grdAllReports.Items[i].Cells[5].Text.ToString(); OBJDTSum.Rows.Add(objDRSum); } } grdTotalCount.DataSource = OBJDTSum; grdTotalCount.DataBind(); //end Code } catch (Exception ex) { Elmah.ErrorSignal.FromCurrentContext().Raise(ex); using (Utils utility = new Utils()) { utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod()); } string str2 = "Error Request=" + id + ".Please share with Technical support."; base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2); } //Method End using (Utils utility = new Utils()) { utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod()); } }