private void Page_Load(object sender, System.EventArgs e) { Image1.Attributes.Add("onclick", "window.open('FindCouncilDistrict.aspx');"); //,'toolbar=yes,location=no,scrollbars=yes,resizable=yes,width=550,height=550');"); if ((Convert.ToString(Session["Problem"]) == "Graffiti")) { this.IsThisGraffiti = true; } this._incident = (Utilites.Incident)Session["Incident"]; this._citizen = (Utilites.Citizen)Session["Citizen"]; //link.Attributes.Add("onclick", "window.open('Chart.aspx?"+ _myButton2.Text+ "','Graph','toolbar=yes,location=no,scrollbars=yes,resizable=yes,width=550,height=550');"); incidentNumber = Convert.ToInt32(Session["IncidentId"]); if (!IsPostBack) { DataSet councilDataSet = Utilites.StaticMethods.GetCouncilDistricts(); councilDistList.DataSource = councilDataSet; councilDistList.DataTextField = "Council District"; councilDistList.DataValueField = "Council District"; councilDistList.DataBind(); incidentNumber = this._incident.IncidentId; this.lblIncidentNumber.Text = incidentNumber.ToString(); if (this.IsThisGraffiti == true) { this.lblIncidentNumber2Graffiti.Enabled = true; this.lblIncidentNumber2Graffiti.Visible = true; this.lblInformOnGraffiti.Enabled = true; this.lblInformOnGraffiti.Visible = true; int number = incidentNumber + 1; this.lblIncidentNumber2Graffiti.Text = Convert.ToString(number); } this.lblDate.Text = Convert.ToString(System.DateTime.Now); this.lblAddress.Text = this._incident.Address; this.lblProblem.Text = Convert.ToString(Session["Problem"]); this.lblEmail.Text = this._citizen.Email; this.lblFirstName.Text = this._citizen.FirstName; this.lblLastName.Text = this._citizen.LastName;; this.lblPhone.Text = this._citizen.PhoneNumber; if (this.lblEmail.Text == "Anonymous" || this.lblEmail.Text == "") { this.btnEmail.Enabled = false; this.lblName.Text = ""; } if (this.lblFirstName.Text == "Annoymous") { this.lblName.Text = Convert.ToString(Session["fname"]) + " "; } } }
private void Page_Load(object sender, System.EventArgs e) { _incident = (Utilites.Incident)Session["Incident"]; _user = (Utilites.User)Session["User"]; this.btnPrint.Attributes.Add("onclick", "javascript: window.open('PrintScreen.aspx?rpt=IncidentReport&prtNum=" + this._incident.IncidentId + "');"); problemTypeList.Attributes.Add("OnChange", "alert('NOTE: If you are changing the problem type and this problem is not associated with your division please change to the correct Department and or Division below and click on the Reassign Call button. Thank you.')"); if (!Page.IsPostBack) { BindData(); lblIncidentNumber.Text += _incident.IncidentId.ToString(); lblDateSubmitted.Text += _incident.OpenDate.ToString(); txtAddress.Text = _incident.Address; txtIncidentDescription.Text = _incident.IncidentDisc; lblLastUpdated.Text += _incident.ModifyDate.ToString(); councilDistList.Items.FindByValue(_incident.CouncilDist).Selected = true; this.lblInsertedBy.Text += _incident.InsertedBy; if (_incident.Openclose == "O") { rbtnOpen.Checked = true; this.btnUpdate.Enabled = true; Session["Status"] = "O"; } else if (_incident.Openclose == "C") { rbtnClosed.Checked = true; this.btnUpdate.Enabled = false; Session["Status"] = "C"; } if (_incident.HasCitizenBeenContacted == true) { this.rbtnCityContactedYes.Checked = true; } else { this.rbtnCityContactedNo.Checked = true; } if (_incident.RequstingClosure == true) { this.rbtnYesClose.Checked = true; } else { this.rbtnNoClose.Checked = true; } if (_incident.Contact == 1) { rbtnYes.Checked = true; } else if (_incident.Contact == 0) { rbtnNo.Checked = true; } if (_incident.CourtDate == System.DateTime.MinValue) { txtCourtDate.Text = ""; } else { txtCourtDate.Text = _incident.CourtDate.ToShortDateString(); } if (_incident.PendingDate == System.DateTime.MinValue) { txtPendingDate.Text = ""; } else { txtPendingDate.Text = _incident.PendingDate.ToShortDateString(); } problemTypeList.Items.FindByValue(Convert.ToString(_incident.ProblemTypeId)).Selected = true; foreach (Utilites.Citizen citizen in _incident.CitizenCollection) { Session["citizen"] = citizen; citizenId = citizen.CitizenId; txtFirstName.Text = citizen.FirstName; txtLastName.Text = citizen.LastName; txtPhoneNumber.Text = citizen.PhoneNumber; txtEmail.Text = citizen.Email; } } Utilites.Assignment assignemnt = new Utilites.Assignment(); assignemntCol = assignemnt.GetAllIncidentAssignments(this._incident.IncidentId); adminTabsPlaceHolder1.IncidentId = this._incident.IncidentId; adminTabsPlaceHolder1.AssignmentCollection = assignemntCol; this.rbtnClosed.Enabled = false; this.rbtnOpen.Enabled = false; if (this._user.IsUserCounciRole() || this._user.IsUserITAdminRole()) { this.rbtnClosed.Enabled = true; this.rbtnOpen.Enabled = true; } }
private void Page_Load(object sender, System.EventArgs e) { incidentnumber = Convert.ToInt32(Session["IncidentNumber"]); this.btnPrint.Attributes.Add("onclick", "javascript: window.open('PrintScreen.aspx?rpt=IncidentReport&prtNum=" + incidentnumber + "');"); problemTypeList.Attributes.Add("OnChange", "alert('NOTE: If you are changing the problem type and this problem is not associated with your division please change to the correct Department and or Division below and click on the Reassign Call button. Thank you.')"); //sm = new SecurityManager(); //sm.AuthorizationProvider = "Authorization Provider"; //sm.SecurityCacheProvider = "Caching Store Provider"; //if(sm.IsUserInRole(User, Global.RoleITAdmin)) role = Global.RoleITAdmin; //else if(sm.IsUserInRole(User,Global.RoleCouncil)) role = Global.RoleCouncil; //else if(sm.IsUserInRole(User,Global.RoleCityManager)) role =Global.RoleCityManager; //else if (sm.IsUserInRole(User,Global.RoleDepartment)) role =Global.RoleDepartment; //else if (sm.IsUserInRole(User,Global.RoleDivision)) role =Global.RoleDivision; if (!Page.IsPostBack) { BindData(); Utilites.Incident incident = new Utilites.Incident(incidentnumber); incident.GetIndividualIncident(); lblIncidentNumber.Text += incident.IncidentId.ToString(); lblDateSubmitted.Text += incident.OpenDate.ToString(); txtAddress.Text = incident.Address; txtIncidentDescription.Text = incident.IncidentDisc; lblLastUpdated.Text += incident.ModifyDate.ToString(); councilDistList.Items.FindByValue(incident.CouncilDist).Selected = true; this.lblInsertedBy.Text += incident.InsertedBy; if (incident.Openclose == "O") { rbtnOpen.Checked = true; this.btnUpdate.Enabled = true; Session["Status"] = "O"; } else if (incident.Openclose == "C") { rbtnClosed.Checked = true; this.btnUpdate.Enabled = false; Session["Status"] = "C"; } if (incident.HasCitizenBeenContacted == true) { this.rbtnCityContactedYes.Checked = true; } else { this.rbtnCityContactedNo.Checked = true; } if (incident.RequstingClosure == true) { this.rbtnYesClose.Checked = true; } else { this.rbtnNoClose.Checked = true; } if (incident.Contact == 1) { rbtnYes.Checked = true; } else if (incident.Contact == 0) { rbtnNo.Checked = true; } if (incident.CourtDate == System.DateTime.MinValue) { txtCourtDate.Text = ""; } else { txtCourtDate.Text = incident.CourtDate.ToShortDateString(); } if (incident.PendingDate == System.DateTime.MinValue) { txtPendingDate.Text = ""; } else { txtPendingDate.Text = incident.PendingDate.ToShortDateString(); } problemTypeList.Items.FindByValue(Convert.ToString(incident.ProblemTypeId)).Selected = true; foreach (Utilites.Citizen citizen in incident.CitizenCollection) { Session["citizen"] = citizen; citizenId = citizen.CitizenId; txtFirstName.Text = citizen.FirstName; txtLastName.Text = citizen.LastName; txtPhoneNumber.Text = citizen.PhoneNumber; txtEmail.Text = citizen.Email; } } Utilites.Assignment assignemnt = new Utilites.Assignment(); assignemntCol = assignemnt.GetAllIncidentAssignments(incidentnumber); adminTabsPlaceHolder1.IncidentId = incidentnumber; adminTabsPlaceHolder1.AssignmentCollection = assignemntCol; this.rbtnClosed.Enabled = false; this.rbtnOpen.Enabled = false; if (role == "Council" || role == "IT Admin") { this.rbtnClosed.Enabled = true; this.rbtnOpen.Enabled = true; } }