예제 #1
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                AddTabInfo("Assignment.ascx", "assignment1");
                ((IIncidentTab)contentControl).Initialize();
            }
            else
            {
                AddTabInfo(Session["controlName"].ToString(), Session["assignment"].ToString());

                Utilites.Assignment assignemnt = new Utilites.Assignment();
                //assignemntCol = assignemnt.GetAllIncidentAssignments(_IncidentId);
                //this.IncidentId=incidentnumber;
                this.AssignmentCollection = assignemnt.GetAllIncidentAssignments(_IncidentId);
            }
        }
예제 #2
0
        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;
            }
        }
예제 #3
0
        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;
            }
        }