Пример #1
0
 public SortItemCommand(nisan nisan)
 {
     this.manager = nisan;
 }
Пример #2
0
 public SortDateCommand(nisan nisan)
 {
     this.manager = nisan;
 }
Пример #3
0
 public ResetFilterCommand(nisan nisan)
 {
     this.manager = nisan;
 }
Пример #4
0
 public SortSoldToCommand(nisan nisan)
 {
     this.manager = nisan;
 }
Пример #5
0
 public FilterPendingOrderCommand(nisan nisan)
 {
     this.manager = nisan;
 }
Пример #6
0
 public FilterNameCommand(nisan nisan)
 {
     this.manager = nisan;
 }
Пример #7
0
 public CommitSvnCommand(nisan nisan)
 {
     this.manager = nisan;
 }
Пример #8
0
 public MarkDoneCommand(nisan nisan)
 {
     this.manager = nisan;
 }
Пример #9
0
 public SaveCommand(nisan nisan)
 {
     this.manager = nisan;
 }
Пример #10
0
 public GenerateSvgCommand(nisan nisan)
 {
     this.manager = nisan;
 }
Пример #11
0
 public RemoveOrderCommand(nisan nisan)
 {
     this.manager = nisan;
 }
Пример #12
0
 public CreateOrderCommand(nisan nisan)
 {
     this.manager = nisan;
 }
Пример #13
0
        public void Initialize(nisan nisan)
        {
            foreach (object obj in nisan.Items)
            {
                if (obj is nisanOrder)
                    nisan.Orders.Add(obj as nisanOrder);
                else if (obj is nisanInvoice)
                    nisan.Invoices.Add(obj as nisanInvoice);
                else if (obj is nisanPurchase)
                    nisan.Purchases.Add(obj as nisanPurchase);
            }
            this.ordersView = CollectionViewSource.GetDefaultView(this.Orders);

            try
            {
                // get last updated date
                string oldFile = ".svn" + Path.DirectorySeparatorChar + "text-base" + Path.DirectorySeparatorChar + FILENAME + ".svn-base";
                GetLastUpdated(oldFile);

                // create empty new item compare to last svn commit
                nisan old;
                nisan.LoadFromFile(oldFile, out old);
                //for (int i = nisan.Items.Count - 1; i < nisan.Items.Count - old.Items.Count; i--)
                //{
                //    if (nisan.Items[i] is nisanOrder)
                //        this.NewItems.Add(nisan.Items[i] as nisanOrder);
                //}
                int i = this.Orders.Count;
                while (this.NewItems.Count < nisan.Items.Count - old.Items.Count)
                {
                    this.NewItems.Add(this.Orders[i - 1]);
                    i--;
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);
                return;
            }
        }