Example #1
0
        private void Refresh()
        {
            Facade.IOrganisation facOrg = new Facade.Organisation();
            int identityID, collectionPointID, deliveryPointID;

            int.TryParse(cboClient.SelectedValue, out identityID);
            int.TryParse(ucCollectionPoint.PointID.ToString(), out collectionPointID);
            int.TryParse(ucDeliveryPoint.PointID.ToString(), out deliveryPointID);

            var selectedClients = hidSelectedClientsValues.Value;

            if (IsClient)
            {
                AllWorkForOrganisation = facOrg.GetAllWorkForClients(selectedClients, rdiStartDate.SelectedDate.Value, rdiEndDate.SelectedDate.Value, collectionPointID, deliveryPointID, cboSearchAgainstWorker.Items[0].Selected || cboSearchAgainstWorker.Items[3].Selected, cboSearchAgainstWorker.Items[1].Selected || cboSearchAgainstWorker.Items[3].Selected, cboSearchAgainstWorker.Items[2].Selected || cboSearchAgainstWorker.Items[3].Selected);
            }
            else
            {
                AllWorkForOrganisation = facOrg.GetAllWorkForSubContractor(identityID, rdiStartDate.SelectedDate.Value, rdiEndDate.SelectedDate.Value, collectionPointID, deliveryPointID, cboSearchAgainstWorker.Items[0].Selected || cboSearchAgainstWorker.Items[3].Selected, cboSearchAgainstWorker.Items[1].Selected || cboSearchAgainstWorker.Items[3].Selected, cboSearchAgainstWorker.Items[2].Selected || cboSearchAgainstWorker.Items[3].Selected);
            }

            BindRepeater();
        }