Пример #1
0
    public ArrayList GetAllPIDS()
    {
        vwarDAL.IDataRepository dal = (new vwarDAL.DataAccessFactory()).CreateDataRepositorProxy();
        allpids = dal.GetAllContentObjects();
        ArrayList list = new ArrayList();

        foreach (vwarDAL.ContentObject co in allpids)
        {
            list.Add(co.PID);
        }
        dal.Dispose();
        return(list);
    }
Пример #2
0
        private void DoSubmitAll()
        {
            vwarDAL.DataAccessFactory   df      = new DataAccessFactory();
            vwarDAL.IDataRepository     dal     = df.CreateDataRepositorProxy();
            IEnumerable <ContentObject> objects = dal.GetAllContentObjects();

            int total   = 0;
            int current = 0;

            foreach (ContentObject co in objects)
            {
                total++;
            }


            progressBar1.Maximum = total;
            progressBar2.Maximum = 4;

            foreach (ContentObject co in objects)
            {
                current++;
                progressBar1.Value = current;
                progressBar2.Value = 0;
                AllowUIToUpdate();
                textBlock1.Text    = LR_3DR_Bridge.ModelDownloadedInternal(co);
                progressBar2.Value = 1;
                AllowUIToUpdate();
                ContentObject co2 = dal.GetContentObjectById(co.PID, false, true);
                textBlock1.Text    = LR_3DR_Bridge.ModelRatedInternal(co2);
                progressBar2.Value = 2;
                AllowUIToUpdate();
                textBlock1.Text    = LR_3DR_Bridge.ModelUploadedInternal(co);
                progressBar2.Value = 3;
                AllowUIToUpdate();
                textBlock1.Text    = LR_3DR_Bridge.ModelViewedInternal(co);
                progressBar2.Value = 4;
                AllowUIToUpdate();
            }
        }