示例#1
0
        public MainForm(int clientId)
        {
            InitializeComponent();
            dm       = new DiginoteManager();
            ClientId = clientId;
            UpdateQuotation();
            UpdateDiginotes();
            UpdatePurchasesAndSales();

            //this is only to center the text in the listBox items
            serialsBox.DrawMode  = DrawMode.OwnerDrawFixed;
            serialsBox.DrawItem += new DrawItemEventHandler(serialsBox_DrawItem);

            SaleOrderRepeater       salesRepeater     = new SaleOrderRepeater();
            PurchaseOrderRepeater   purchaseRepeater  = new PurchaseOrderRepeater();
            ChangeQuotationRepeater quotationRepeater = new ChangeQuotationRepeater();

            salesRepeater.fullSaleOrder += new SaleOrderHandler(ChangeDiginotes);
            dm.saleOrder += new SaleOrderHandler(salesRepeater.Repeater);

            purchaseRepeater.fullPurchaseOrder += new PurchaseOrderHandler(ChangeDiginotes);
            dm.purchaseOrder += new PurchaseOrderHandler(purchaseRepeater.Repeater);

            quotationRepeater.changeQuotation += new ChangeQuotationHandler(UpdateQuotation);
            dm.changeQuotation += new ChangeQuotationHandler(quotationRepeater.Repeater);

            purchaseTimer          = new System.Windows.Forms.Timer();
            purchaseTimer.Tick    += new EventHandler(purchaseTimerTick);
            purchaseTimer.Interval = 1000;

            salesTimer          = new System.Windows.Forms.Timer();
            salesTimer.Tick    += new EventHandler(salesTimerTick);
            salesTimer.Interval = 1000;

            instance = this;
        }
示例#2
0
 public RegisterForm()
 {
     InitializeComponent();
     dm = new DiginoteManager();
 }
示例#3
0
 public LoginForm()
 {
     InitializeComponent();
     dm = new DiginoteManager();
 }