Exemplo n.º 1
0
 public ResponseForm(Response response)
 {
     _responseService = new ResponseBLL();
     InitializeComponent();
     this.response = response;
     PopulateForm();
 }
Exemplo n.º 2
0
        public static ForumResponse ForumResponse_ADD(ForumResponse model)
        {
            IES.JW.Model.User user = IES.Service.UserService.CurrentUser;
            model.UserID   = user.UserID;
            model.UserName = user.UserName;
            var fr = new ResponseBLL().ForumResponse_ADD(model);

            fr.ResponseFile = IES.Service.FileService.Attachment_NoCache_List(new Attachment {
                Source = "ForumResponse", SourceID = fr.ResponseID
            });
            return(fr);
        }
        public StationResponseForm()
        {
            _stationResponseService = new StationResponseBLL();
            InitializeComponent();
            responseBll    = new ResponseBLL();
            stationBLL     = new StationBLL();
            vehicleTypeBLL = new VehicleTypeBLL();

            responses    = responseBll.GetAll();
            stations     = stationBLL.GetAll();
            vehicleTypes = vehicleTypeBLL.GetAll();

            cmbResponseId.DataSource    = responses;
            cmbStationId.DataSource     = stations;
            cmbVehicleTypeId.DataSource = vehicleTypes;
        }
Exemplo n.º 4
0
        public static ForumResponseInfo ForumResponseInfo_List(ForumResponse model, int PageIndex = 1, int PageSize = 10)
        {
            //ResponseFile
            ForumResponseInfo fr = new ForumResponseInfo();

            fr = new ResponseBLL().ForumResponseInfo_List(model, PageIndex, PageSize);
            for (int i = 0; i < fr.forumresponselist.Count; i++)
            {
                if (fr.forumresponselist[i].ParentID == 0)
                {
                    fr.forumresponselist[i].ResponseFile = IES.Service.FileService.Attachment_NoCache_List(new Attachment {
                        Source = "ForumResponse", SourceID = fr.forumresponselist[i].ResponseID
                    });
                }
            }
            return(fr);
        }
Exemplo n.º 5
0
        private void CmbResponseId_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox comboBox = (ComboBox)sender;

            StationResponse responseSelected = (StationResponse)comboBox.SelectedItem;

            if (responseSelected != null)
            {
                //Is Emergency service needed
                ResponseBLL responseBll = new ResponseBLL();
                Response    response    = responseBll.Get(responseSelected.ResponseId);
                chbIsEmergency.Checked = response.Emergency;

                requiredVehicles = responseSelected.NumberOfVehicles;


                //Number of vehicles
                lblComment.Text = requiredVehicles.ToString() + " vehicles required";
            }
        }
Exemplo n.º 6
0
 public ResponseListForm()
 {
     _responseService = new ResponseBLL();
     InitializeComponent();
 }