private void LoadForAllList()
        {
            // all list
            devices = from device in App.ViewModel.AllTheDevice
                      group device by device.DeviceNameFirstLetter into c
                      orderby c.Key
                      select new PublicGrouping<string, Device>(c);

            All.GroupHeaderTemplate = this.Resources["GroupHeaderNameFirst"] as DataTemplate;
            All.ItemsSource = devices;
            All.GroupItemTemplate = this.Resources["GroupItemNameFirst"] as DataTemplate;

            var SpaceItem = from device in App.ViewModel.AllTheDevice
                            where device.Classification == "SPACE"
                            select device;
            SpaceList.ItemsSource = SpaceItem;

            var FriendItem = from device in App.ViewModel.AllTheDevice
                             where device.Classification == "FRIEND"
                             select device;
            FriendList.ItemsSource = FriendItem;

            // public device list
            var publicDevice = from device in App.ViewModel.AllTheDevice
                               where device.Classification == "PUBLIC"
                               select device;
            PublicList.ItemsSource = publicDevice;

            var privateDevice = from device in App.ViewModel.AllTheDevice
                                where device.Classification == "PRIVATE"
                                select device;
            PrivateList.ItemsSource = privateDevice;
        }
        private void LoadDevices()
        {
            List<Device> PublicThings = new List<Device>
            {
                new Device(){ DeviceName="Television", DeviceLocation="\\msra\\floor\\12\\focus_room" },
                new Device(){ DeviceName="Light", DeviceLocation="\\msra\\floor\\12\\focus_room"},
                new Device(){ DeviceName="Light2", DeviceLocation="\\msra\\floor\\12\\focus_room"},
                new Device(){ DeviceName="Light3", DeviceLocation="\\msra\\floor\\12\\focus_room"},
                new Device(){ DeviceName="Computer", DeviceLocation="\\msra\\floor\\12\\fred_cubical"},
                new Device(){ DeviceName="Xbox 360", DeviceLocation="\\msra\\floor\\12\\lobby"},
                new Device(){ DeviceName="Oscilloscope", DeviceLocation="\\msra\\floor\\12\\fred_cubical"}
            };

            deviceByLocation = from device in PublicThings
                                   group device by device.DeviceLocation into c
                                   orderby c.Key
                                   select new PublicGrouping<string, Device>(c);

            deviceByName = from device in PublicThings
                                   group device by device.DeviceNameFirstLetter into c
                                   orderby c.Key
                                   select new PublicGrouping<string, Device>(c);

            ListPublicThing.ItemsSource = deviceByName;
        }
 public ChangeReesterRecordStatusForm(System.Collections.Generic.IEnumerable<PayReesterRecord> reesterRecords)
     : this()
 {
     this.sfdStatus.Faset = FasetsEnum.PaymentReestrStatus;
     this.sfdStatus.RefreshValuesWithNull();
     this.m_ReesterRecords = reesterRecords;
 }
Beispiel #4
0
 /// <summary>
 ///Initializes a new instance of the SchemaLibrary class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public SchemaLibrary(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
 /// <summary>
 ///Initializes a new instance of the AdditionalCharacteristicsInfo class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public AdditionalCharacteristicsInfo(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
Beispiel #6
0
        public static System.Collections.Generic.IEnumerable <TResult> CustomSelect <TSource, TResult>(this System.Collections.Generic.IEnumerable <TSource> source, Func <TSource, int, TResult> selector)
        {
            List <TResult> finalList = new List <TResult>();
            int            index     = 0;

            foreach (var i in source)
            {   //work in progress..
                TResult obj = selector(i, index);
                finalList.Add(obj);
                index++;
            }
            return(finalList);
        }
Beispiel #7
0
 public DatabaseBuilder Append(System.Collections.Generic.IEnumerable <SkillMaster> dataSource)
 {
     AppendCore(dataSource, x => (x.SkillId, x.SkillLevel), System.Collections.Generic.Comparer <(int SkillId, int SkillLevel)> .Default);
     return(this);
 }
Beispiel #8
0
 public DatabaseBuilder Append(System.Collections.Generic.IEnumerable <UserLevel> dataSource)
 {
     AppendCore(dataSource, x => x.Level, System.Collections.Generic.Comparer <int> .Default);
     return(this);
 }
Beispiel #9
0
 /// <summary>
 ///Initializes a new instance of the ThreadingInfo class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public ThreadingInfo(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
Beispiel #10
0
 /// <summary>
 ///Initializes a new instance of the CustomDocumentProperty class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public CustomDocumentProperty(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
 /// <summary>
 ///Initializes a new instance of the WebExtensionTaskpane class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public WebExtensionTaskpane(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
Beispiel #12
0
 /// <summary>
 ///Initializes a new instance of the OfficeArtExtensionList class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public OfficeArtExtensionList(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
Beispiel #13
0
 public ConversionFileList(System.Collections.Generic.IEnumerable <FileInfo> fiColl)
 {
     Add(fiColl);
 }
        public override System.Web.Mvc.JsonResult UpdateRoles(long id, System.Collections.Generic.IEnumerable <string> ids, System.Collections.Generic.IEnumerable <string> selids)
        {
            var callInfo = new T4MVC_JsonResult(Area, Name, ActionNames.UpdateRoles);

            callInfo.RouteValueDictionary.Add("id", id);
            callInfo.RouteValueDictionary.Add("ids", ids);
            callInfo.RouteValueDictionary.Add("selids", selids);
            return(callInfo);
        }
Beispiel #15
0
 public void Load(System.Collections.Generic.IEnumerable <string> filePatterns)
 {
     throw new System.NotImplementedException();
 }
 /// <summary>
 ///Initializes a new instance of the NonVisualContentPartProperties class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public NonVisualContentPartProperties(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
Beispiel #17
0
 /// <summary>
 ///Initializes a new instance of the ContentTypeSchema class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public ContentTypeSchema(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
Beispiel #18
0
 /// <summary>
 ///Initializes a new instance of the SchemaReferences class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public SchemaReferences(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
 public void SetMethodBody(byte[] il, int maxStack, byte[] localSignature, System.Collections.Generic.IEnumerable <System.Reflection.Emit.ExceptionHandler> exceptionHandlers, System.Collections.Generic.IEnumerable <int> tokenFixups)
 {
     throw new PlatformNotSupportedException();
 }
        public double CalculatePortfolioXIRR(System.Collections.Generic.IEnumerable <double> values, System.Collections.Generic.IEnumerable <DateTime> date)
        {
            double result = 0;

            try
            {
                result = System.Numeric.Financial.XIrr(values, date);
                //This 'if' loop is a temporary fix for the error where calculation is done for XIRR instead of average
                if (result.ToString().Contains("E") || result.ToString().Contains("e"))
                {
                    result = 0;
                }
                return(result);
            }
            catch (Exception ex)
            {
                string e = ex.ToString();
                return(result);
            }
        }
Beispiel #21
0
 /// <summary>
 ///Initializes a new instance of the LockedCanvas class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public LockedCanvas(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
Beispiel #22
0
 public DatabaseBuilder Append(System.Collections.Generic.IEnumerable <TestMaster> dataSource)
 {
     AppendCore(dataSource, x => x.TestID, System.Collections.Generic.Comparer <int> .Default);
     return(this);
 }
Beispiel #23
0
        private void Editor_ContextMenuOpening(object sender, ContextMenuEventArgs e)
        {
            this.Editor.ContextMenu = this.EditorContextMenu;
            if (this.SpellCheckProvider == null)
            {
                return;
            }
            TextViewPosition?positionFromPoint = this.Editor.GetPositionFromPoint(Mouse.GetPosition(this.Editor));

            if (!positionFromPoint.HasValue)
            {
                return;
            }
            int offset = this.Editor.Document.GetOffset(positionFromPoint.Value.Line, positionFromPoint.Value.Column);

            System.Collections.Generic.IEnumerable <TextSegment> spellCheckErrors = this.SpellCheckProvider.GetSpellCheckErrors();
            TextSegment textSegment = spellCheckErrors.FirstOrDefault((TextSegment segment) => segment.StartOffset <= offset && segment.EndOffset >= offset);

            if (textSegment == null)
            {
                return;
            }
            DocumentLine lineByOffset = this.Editor.Document.GetLineByOffset(offset);

            if (offset == lineByOffset.Offset || offset == lineByOffset.EndOffset)
            {
                return;
            }
            System.Collections.Generic.IEnumerable <string> spellcheckSuggestions = this.SpellCheckProvider.GetSpellcheckSuggestions(this.Editor.Document.GetText(textSegment));
            int num = 0;

            if (spellcheckSuggestions.Any <string>())
            {
                foreach (string current in spellcheckSuggestions)
                {
                    MenuItem menuItem = new MenuItem
                    {
                        Header     = current,
                        FontWeight = FontWeights.Bold,
                        Tag        = textSegment
                    };
                    menuItem.Click += new RoutedEventHandler(this.SuggestionItem_Click);
                    this.Editor.ContextMenu.Items.Insert(num, menuItem);
                    num++;
                }
            }
            MenuItem menuItem2 = new MenuItem
            {
                Header = LocalizationProvider.GetLocalizedString("MenuItem_AddToDictionary", false, "MarkdownPadStrings"),
                Tag    = textSegment
            };

            menuItem2.Click += delegate(object o, RoutedEventArgs args)
            {
                MenuItem    menuItem3 = args.OriginalSource as MenuItem;
                TextSegment segment   = (TextSegment)menuItem3.Tag;
                string      text      = this.Editor.Document.GetText(segment);
                this.SpellingService.AddWordToCustomDictionary(text);
                this.SpellCheckProvider.DoSpellCheck();
            };
            this.Editor.ContextMenu.Items.Insert(num, menuItem2);
            num++;
            Separator insertItem = new Separator();

            this.Editor.ContextMenu.Items.Insert(num, insertItem);
        }
 /// <summary>
 ///Initializes a new instance of the TimeSlicer class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public TimeSlicer(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
 /// <summary>
 ///Initializes a new instance of the GroupShape class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public GroupShape(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
Beispiel #26
0
        public static System.Collections.Generic.IEnumerable <TSource> CustomWhere <TSource>(this System.Collections.Generic.IEnumerable <TSource> source, Func <TSource, bool> predicate)
        {
            List <TSource> List = new List <TSource>();

            foreach (var i in source)
            {
                if (predicate(i))
                {
                    List.Add(i);
                }
            }
            return(List);
        }
 /// <summary>
 ///Initializes a new instance of the WordprocessingGroup class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public WordprocessingGroup(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
Beispiel #28
0
        public PagingDataSet <OperationLogEntry> GetLogs(OperationLogQuery query, int pageSize, int pageIndex)
        {
            Sql builder = Sql.Builder;

            if (query.ApplicationId.HasValue)
            {
                builder.Where("ApplicationId = @0", new object[]
                {
                    query.ApplicationId
                });
            }
            if (!string.IsNullOrEmpty(query.Keyword))
            {
                builder.Where("OperationObjectName like @0 or Description like @0", new object[]
                {
                    '%' + query.Keyword + '%'
                });
            }
            if (!string.IsNullOrEmpty(query.OperationType))
            {
                builder.Where("OperationType = @0", new object[]
                {
                    query.OperationType
                });
            }
            if (!string.IsNullOrEmpty(query.Operator))
            {
                builder.Where("Operator like @0", new object[]
                {
                    "%" + query.Operator + "%"
                });
            }
            if (query.StartDateTime.HasValue)
            {
                builder.Where("DateCreated >= @0", new object[]
                {
                    query.StartDateTime.Value
                });
            }
            if (query.EndDateTime.HasValue)
            {
                builder.Where("DateCreated <= @0", new object[]
                {
                    query.EndDateTime.Value
                });
            }
            if (query.OperatorUserId.HasValue)
            {
                builder.Where("OperatorUserId = @0", new object[]
                {
                    query.OperatorUserId.Value
                });
            }
            if (!string.IsNullOrEmpty(query.Source))
            {
                builder.Where("Source like @0", new object[]
                {
                    "%" + query.Source + "%"
                });
            }
            builder.OrderBy(new object[]
            {
                "Id desc"
            });
            PagingEntityIdCollection pagingEntityIdCollection = this.CreateDAO().FetchPagingPrimaryKeys <OperationLogEntry>((long)this.PrimaryMaxRecords, pageSize, pageIndex, builder);

            System.Collections.Generic.IEnumerable <OperationLogEntry> entities = this.PopulateEntitiesByEntityIds <object>(pagingEntityIdCollection.GetPagingEntityIds(pageSize, pageIndex));
            return(new PagingDataSet <OperationLogEntry>(entities)
            {
                PageIndex = pageIndex,
                PageSize = pageSize,
                TotalRecords = pagingEntityIdCollection.TotalRecords
            });
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ParallelTasksExecutionEngine"/> class.
 /// </summary>
 /// <param name="options">The options.</param>
 /// <param name="operations">The operations.</param>
 public ParallelTasksExecutionEngine(ParallelOptions options, System.Collections.Generic.IEnumerable<IServiceOperation> operations)
 {
     this._options = options;
     this._operations = operations;
 }
 /// <summary>
 ///Initializes a new instance of the LongProperties class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public LongProperties(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
Beispiel #31
0
        static void Main(string[] args)
        {
            System.Collections.Generic.IEnumerable <String> lines = File.ReadLines("file.txt");

            foreach (var item in lines)
            {
                string Connection    = "NextwaverDatabase";
                string OfficeSpaceId = "OF.0001";
                string DatabaseName  = "GunBook";

                string RootPath = "//Document/Data/Section[@ID='1']/Items[@Name='GunBook']";

                string RootPathPage = "//Document/Data/Section[@ID='1']/Items[@Name='Page']";

                System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.RealTime;

                string bookno         = getParam(item, "bookno");
                string bookyear       = getParam(item, "bookyear");
                string gunregidstart  = getParam(item, "gunregidstart");
                string gunregidend    = getParam(item, "gunregidend");
                string pagetotal      = getParam(item, "pagetotal");
                string gunregidprefix = getParam(item, "gunregidprefix");
                string dual           = getParam(item, "dual");
                int    n;
                if (bookno.Trim() != "" && pagetotal.Trim() != "" && int.TryParse(bookno, out n) && int.TryParse(bookyear, out n) && int.TryParse(pagetotal, out n))
                {
                    System.Console.WriteLine("Create Book " + bookno);
                    Boolean isSuccess = false;
                    for (int iindex = 0; iindex < 10; iindex++)
                    {
                        if (iindex > 1)
                        {
                            System.Console.WriteLine("Rerun Book :: " + bookno);
                        }
                        try
                        {
                            string NCS_Encrypt;
                            string NWS_Encrypt;
                            NextwaverDB.NColumns NCS_S;
                            DataTable            dt;

                            WorkSpace.Service WS = new WorkSpace.Service();

                            NextwaverDB.NWheres NWS = new NextwaverDB.NWheres();
                            NWS.Add(new NextwaverDB.NWhere("BOOKNO", bookno));

                            NCS_S = new NextwaverDB.NColumns();
                            NCS_S.Add(new NextwaverDB.NColumn("BOOKNO"));

                            NCS_Encrypt = new EncryptDecrypt.CryptorEngine().Encrypt(NCS_S.ExportString(), true);
                            NWS_Encrypt = new EncryptDecrypt.CryptorEngine().Encrypt(NWS.ExportString(), true);

                            dt = WS.SelectByColumnAndWhere(Connection, OfficeSpaceId, DatabaseName, "Book", NCS_Encrypt, NWS_Encrypt, "System");
                            if (dt.Rows.Count == 0)
                            {
                                XmlDocument xDoc = new XmlDocument();
                                xDoc.Load(@"tempdoc\Book.xml");

                                NextwaverDB.NColumns NCS = new NextwaverDB.NColumns();
                                NCS.Add(new NextwaverDB.NColumn("BOOKNO", bookno));
                                NCS.Add(new NextwaverDB.NColumn("BOOKYEAR", bookyear));
                                NCS.Add(new NextwaverDB.NColumn("GUNREGIDSTART", gunregidstart));
                                NCS.Add(new NextwaverDB.NColumn("GUNREGIDEND", gunregidend));
                                NCS.Add(new NextwaverDB.NColumn("PAGETOTAL", pagetotal));
                                NCS.Add(new NextwaverDB.NColumn("GUNREGIDPREFIX", gunregidprefix));
                                NCS.Add(new NextwaverDB.NColumn("BOOKSTATUS", "Create"));
                                NCS.Add(new NextwaverDB.NColumn("CREATEDATE", convertDatetime(DateTime.Now)));
                                NCS.Add(new NextwaverDB.NColumn("CREATEBY", "System"));
                                NCS.Add(new NextwaverDB.NColumn("UPDATEDATE", convertDatetime(DateTime.Now)));
                                NCS.Add(new NextwaverDB.NColumn("UPDATEBY", "System"));

                                AddDataXmlNode(xDoc, RootPath + "/Item[@Name='BookNo']", bookno);
                                AddDataXmlNode(xDoc, RootPath + "/Item[@Name='BookYear']", bookyear);
                                AddDataXmlNode(xDoc, RootPath + "/Item[@Name='GunRegIDStart']", gunregidstart);
                                AddDataXmlNode(xDoc, RootPath + "/Item[@Name='GunRegIDEnd']", gunregidend);
                                AddDataXmlNode(xDoc, RootPath + "/Item[@Name='PageTotal']", pagetotal);
                                AddDataXmlNode(xDoc, RootPath + "/Item[@Name='GunRegIDPrefix']", gunregidprefix);
                                AddDataXmlNode(xDoc, RootPath + "/Item[@Name='BookStatus']", "Create");
                                AddDataXmlNode(xDoc, RootPath + "/Item[@Name='CreateDate']", convertDatetime(DateTime.Now));
                                AddDataXmlNode(xDoc, RootPath + "/Item[@Name='CreateBy']", "System");
                                AddDataXmlNode(xDoc, RootPath + "/Item[@Name='UpdateDate']", convertDatetime(DateTime.Now));
                                AddDataXmlNode(xDoc, RootPath + "/Item[@Name='UpdateBy']", "System");

                                string   strDoc = xDoc.OuterXml;
                                string[] OP     = WS.InsertData(Connection, OfficeSpaceId, DatabaseName, "Book", NCS.ExportString(), strDoc, "System");

                                if (OP[0].ToUpper() == "OK")
                                {
                                }
                                else
                                {
                                    File.AppendAllText("log.txt", Environment.NewLine + Environment.NewLine
                                                       + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") + " :: " + OP[1]);
                                    System.Console.WriteLine(OP[1]);
                                    //isSuccess = false;
                                    break;
                                }
                            }

                            NWS = new NextwaverDB.NWheres();
                            NWS.Add(new NextwaverDB.NWhere("BOOKNO", bookno));
                            NWS.Add(new NextwaverDB.NWhere("PAGEVERSION", "1"));

                            NCS_S = new NextwaverDB.NColumns();
                            NCS_S.Add(new NextwaverDB.NColumn("BOOKNO"));
                            NCS_S.Add(new NextwaverDB.NColumn("PAGENO"));

                            NCS_Encrypt = new EncryptDecrypt.CryptorEngine().Encrypt(NCS_S.ExportString(), true);
                            NWS_Encrypt = new EncryptDecrypt.CryptorEngine().Encrypt(NWS.ExportString(), true);

                            XmlDocument xDocPage = new XmlDocument();
                            xDocPage.Load(@"tempdoc\Page.xml");
                            AddDataXmlNode(xDocPage, RootPathPage + "/Item[@Name='BookNo']", bookno);
                            AddDataXmlNode(xDocPage, RootPathPage + "/Item[@Name='PageVersion']", "1");
                            AddDataXmlNode(xDocPage, RootPathPage + "/Item[@Name='PageStatus']", "Create");
                            AddDataXmlNode(xDocPage, RootPathPage + "/Item[@Name='CreateDate']", convertDatetime(DateTime.Now));
                            AddDataXmlNode(xDocPage, RootPathPage + "/Item[@Name='CreateBy']", "System");
                            AddDataXmlNode(xDocPage, RootPathPage + "/Item[@Name='UpdateDate']", convertDatetime(DateTime.Now));
                            AddDataXmlNode(xDocPage, RootPathPage + "/Item[@Name='UpdateBy']", "System");

                            DataTable dtp;
                            dtp = WS.SelectByColumnAndWhere(Connection, OfficeSpaceId, DatabaseName, "Page", NCS_Encrypt, NWS_Encrypt, "System");
                            int MaxPageTotal = dtp.Rows.Count;

                            bool isuccess = true;
                            if (MaxPageTotal < int.Parse(pagetotal))
                            {
                                for (int i = (MaxPageTotal + 1); i <= int.Parse(pagetotal); i++)
                                {
                                    NextwaverDB.NColumns NCSPage = new NextwaverDB.NColumns();
                                    NCSPage.Add(new NextwaverDB.NColumn("BOOKNO", bookno));
                                    NCSPage.Add(new NextwaverDB.NColumn("PAGEVERSION", "1"));
                                    NCSPage.Add(new NextwaverDB.NColumn("PAGESTATUS", "Create"));
                                    NCSPage.Add(new NextwaverDB.NColumn("CREATEDATE", convertDatetime(DateTime.Now)));
                                    NCSPage.Add(new NextwaverDB.NColumn("CREATEBY", "System"));
                                    NCSPage.Add(new NextwaverDB.NColumn("UPDATEDATE", convertDatetime(DateTime.Now)));
                                    NCSPage.Add(new NextwaverDB.NColumn("UPDATEBY", "System"));
                                    NCSPage.Add(new NextwaverDB.NColumn("PAGENO", i.ToString()));

                                    AddDataXmlNode(xDocPage, RootPathPage + "/Item[@Name='PageNo']", i.ToString());

                                    string   strDocPage = xDocPage.OuterXml;
                                    string[] OPPage     = WS.InsertData(Connection, OfficeSpaceId, DatabaseName, "Page", NCSPage.ExportString(), strDocPage, "System");

                                    if (OPPage[0].ToUpper() == "OK")
                                    {
                                        System.Console.WriteLine("Create Book " + bookno + " Page " + i.ToString());
                                    }
                                    else
                                    {
                                        File.AppendAllText("log.txt", Environment.NewLine + Environment.NewLine
                                                           + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") + " :: " + OPPage[1]);

                                        System.Console.WriteLine(OPPage[1]);
                                        isuccess = false;
                                        break;
                                    }
                                }
                            }

                            System.Console.WriteLine("Create Book " + bookno + " Success");
                            isSuccess = isuccess;
                        }
                        catch (Exception ex)
                        {
                            File.AppendAllText("log.txt", Environment.NewLine + Environment.NewLine
                                               + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") + " :: Book:" + bookno + " --> " + ex.Message);
                            break;
                        }

                        if (isSuccess)
                        {
                            break;
                        }
                        else
                        {
                            System.Threading.Thread.Sleep(500);
                        }
                    }
                }
                //
            }
        }
Beispiel #32
0
 public abstract Task <bool> UpdateAsync(System.Collections.Generic.IEnumerable <Argument> arguments);
 /// <summary>
 ///Initializes a new instance of the Transform2D class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public Transform2D(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
Beispiel #34
0
 /// <summary>
 ///Initializes a new instance of the ContextNode class with the specified child elements.
 /// </summary>
 /// <param name="childElements">Specifies the child elements.</param>
 public ContextNode(System.Collections.Generic.IEnumerable <OpenXmlElement> childElements)
     : base(childElements)
 {
 }
 /// <summary>
 /// Get current transform
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void TryTraceTransform(object sender,RhinoTransformObjectsEventArgs e)
 {
     CurrentTransform = e.Transform;
     CurrentObj = RhinoDoc.ActiveDoc.Objects.GetSelectedObjects(true, true); // Is there a better way to select objects? (unable to select from e)
 }