Exemplo n.º 1
0
 public AvailabilityCollection FetchAll()
 {
     AvailabilityCollection coll = new AvailabilityCollection();
     Query qry = new Query(Availability.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
Exemplo n.º 2
0
        public static List <Availability> GetAvailabilityRecords(int Month, int Year)
        {
            AvailabilityCollection availabilityRecords = new AvailabilityCollection();

            availabilityRecords.Where(Availability.Columns.Month, Month).Where(Availability.Columns.Year, Year).Load();
            return(availabilityRecords.GetList());
        }
Exemplo n.º 3
0
        /// <summary>
        ///   Constructor
        /// </summary>
        public WorkerFrm()
        {
            InitializeComponent();

            try
            {
                this._keyServiceUsers              = new ServiceUserCollection();
                this._keyServiceUsers.ObjectAdded += new Cura.Common.Collection <ServiceUser> .CollectionChangeEvent(this.KeyServiceUsersChanged);

                this._keyServiceUsers.ObjectRemoved += new Cura.Common.Collection <ServiceUser> .CollectionChangeEvent(this.KeyServiceUsersChanged);

                this._availabilities = new AvailabilityCollection();

                this._availabilities.ObjectAdded += new Cura.Common.Collection <Availability> .CollectionChangeEvent(this.AvailabilitiesChanged);

                this._availabilities.ObjectRemoved += new Cura.Common.Collection <Availability> .CollectionChangeEvent(this.AvailabilitiesChanged);

                this._longLat = new LongLat();

                this.tabControl1.SelectedIndex = 0;

                int weeks = Settings.Instance.rotaweekcount;

                for (int i = 0; i < weeks; i++)
                {
                    treeView1.Nodes.Add("Week " + (i + 1).ToString());
                }

                treeView1.MouseDown += (sender, args) => treeView1.SelectedNode = treeView1.GetNodeAt(args.X, args.Y);

                //show core hours first
                splitContainer5.Panel1Collapsed = false;
                splitContainer5.Panel2Collapsed = true;


                ((OLVColumn)callHistoryObjectListView.Columns[0]).GroupKeyGetter = delegate(object rowObject)
                {
                    Call_Slim model = rowObject as Call_Slim;

                    return(model.Day);
                };

                numberLbl.Text = String.Format("{0} Number", Settings.Instance.WorkerNumberAlias).Trim();
                splitContainer8.SplitterDistance = pictureBox12.Width + numberLbl.Width + 5;
            }
            catch (Exception ex)
            {
                Cura.Common.Common.LogError("Failed To Initialise Worker Form", ex);
            }
        }
Exemplo n.º 4
0
 public static List<Availability> GetAvailabilityRecords(int Month, int Year)
 {
     AvailabilityCollection availabilityRecords = new AvailabilityCollection();
     availabilityRecords.Where(Availability.Columns.Month, Month).Where(Availability.Columns.Year, Year).Load();
     return availabilityRecords.GetList();
 }
Exemplo n.º 5
0
 public AvailabilityCollection FetchByQuery(Query qry)
 {
     AvailabilityCollection coll = new AvailabilityCollection();
     coll.LoadAndCloseReader(qry.ExecuteReader()); 
     return coll;
 }
Exemplo n.º 6
0
 public AvailabilityCollection FetchByID(object Id)
 {
     AvailabilityCollection coll = new AvailabilityCollection().Where("id", Id).Load();
     return coll;
 }