-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrmDashboard.cs
1090 lines (901 loc) · 31.3 KB
/
frmDashboard.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using prjGrow.General;
using prjGrow.Reports;
using prjGrow.StockInfo;
using prjGrow.Users;
using prjGrow.Accounts;
using prjGrow.Reporting;
using prjGrow.Manufacture;
using prjGrow.Classes;
using prjGrow.Fnb;
namespace prjGrow
{
public partial class frmDashboard : Form
{
private int childFormNumber = 0;
Custom custom = new Custom();
Orders odr = new Orders();
public frmDashboard()
{
InitializeComponent();
}
private void showFrm(Form frm)
{
if (Constants.multiple_forms)
frm.Show();
else
frm.ShowDialog();
// frm.BringToFront();
}
void processes()
{
process_cheq();
}
void process_cheq()
{
Cheque cheq = new Cheque();
cheq.processCheque();
}
void loadDashboardInfo()
{
lblWelcome.Text = "Wellcome, Mr. " + User.curfullName;
lblClient.Text = Constants.client_name;
lblContact.Text = Constants.client_contact;
lblAdrs.Text = Constants.client_adrs;
}
void resize()
{
Size siz = SystemInformation.VirtualScreen.Size;
if(siz.Height == 768 && siz.Width == 1024)
this.Font = new Font("Segoe UI", 9, FontStyle.Bold);
if (Custom.largeScreen)
this.Font = new Font("Serif", 16);
}
void customDashboard()
{
pnlOrder.Visible = Custom.mod_bakers || Custom.fet_cus_order;
pnlManufacture.Visible = Custom.mod_manufact;
pnlManufactRep.Visible = Custom.mod_manufact || Custom.mod_fnb;
pnlOrdersRep.Visible = Custom.mod_bakers || Custom.fet_cus_order;
menuManufacture.Visible = Custom.mod_manufact || Custom.mod_fnb;
pnlLogistic.Visible = Custom.mod_bakers || Custom.mod_manufact;
pnlImei.Visible = Custom.mod_mobile;
pnlOrderProg.Visible = Custom.mod_manufact && Custom.fet_cus_order;
pnlInvoice.Visible = !(Custom.client_id_active == 5);
mtmTables.Visible = Custom.mod_fnb;
mtmComp.Visible = Custom.mod_fnb;
mtmSale.Visible = !Custom.mod_fnb;
mtmSaleReview.Visible = !Custom.mod_fnb;
mtmOrder.Visible = Custom.mod_bakers || Custom.fet_cus_order;
mtmCusOrder.Visible = Custom.mod_bakers || Custom.fet_cus_order;
mtmOrderReview.Visible = Custom.mod_bakers || Custom.fet_cus_order;
mtmBarcode.Visible = Custom.mod_bakers || Custom.mod_mobile;
mtmOrdAct.Visible = Custom.mod_bakers || Custom.fet_cus_order;
mtmOrderProg.Visible = sepOrder.Visible = Custom.client_id_active == 2 || Custom.fet_cus_order;
mtmFoodOrder.Visible = mtmFoodReview.Visible = Custom.mod_fnb;
mtmExpiryRep.Visible = Custom.mod_bakers;
mtmAutoConsume.Visible = Custom.client_id_active == 5;
mtmClient.Visible = User.curAuth == 1;
mtmInbd.Visible = mtmInbdRep.Visible = Custom.mod_bakers || Custom.mod_manufact;
mtmStkDis.Visible = Custom.client_id_active == 7;
mtmAutoConsumeS.Visible = Custom.client_id_active == 2;
mtmVehicle.Visible = Custom.client_id_active == 7;
mtmIMEI.Visible = Custom.mod_mobile;
pnlOrdersDisp.Visible = Custom.fet_cus_order;
if (pnlOrdersDisp.Visible)
showOrdersOnDashboard();
if (Custom.mod_fnb)
{
menuManufacture.Text = "Food and Beverage";
lblSale.Text = mtmSale.Text = "Food Orders";
lblOrderProg.Text = mtmOrder.Text = "Special Orders";
lblProcessing.Text = mtmProcess.Text = "Food Costing";
mtmProcessReview.Text = "Consting Review";
}
if (Custom.mod_manufact)
{
mtmSale.Text = "Sale and Delivery";
mtmSaleReview.Text = "Sale and Delivery Review";
lblSale.Text = "Sale and Delivery";
}
if (Custom.client_id_active == 5)
{
mtmInbd.Visible = mtmInbdRep.Visible = true;
mtmProcessReview.Visible = true;
}
if (lblClient.Text.Length > 40)
lblClient.Font = new Font("Microsoft Sans Serif", 20, FontStyle.Bold);
}
void showOrdersOnDashboard()
{
odr.getDashboardOrders();
lblPendingOrders.Text = Orders.pendingOrders;
lblReadyOrders.Text = Orders.readyOrders;
lblOverdueOrders.Text = Orders.overdueOrders;
}
public void secureDashboard()
{
bool isAdmin = User.curAuth == 1 || User.curAuth == 2;
pnlPls.Visible = isAdmin;
mtmBalSheet.Enabled = isAdmin;
mtmBank.Enabled = isAdmin;
mtmTrialBal.Enabled = isAdmin;
mtmCashFlow.Enabled = isAdmin;
mtmDraw.Enabled = isAdmin;
mtmEmpPay.Enabled = isAdmin;
mtmEmpLed.Enabled = isAdmin;
mtmEmp.Enabled = isAdmin;
mtmStockRep.Enabled = isAdmin;
mtmSaleRep.Enabled = isAdmin;
mtmSupPay.Enabled = isAdmin;
mtmSupplier.Enabled = isAdmin;
mtmPurRep.Enabled = isAdmin;
mtmDraw.Enabled = isAdmin;
mtmDamage.Enabled = isAdmin;
mtmBankTran.Enabled = isAdmin;
mtmBankLed.Enabled = isAdmin;
mtmAutoConsume.Enabled = isAdmin;
mtmAsset.Enabled = isAdmin;
mtmAssetPurchase.Enabled = isAdmin;
mtmBankCheques.Enabled = isAdmin;
mtmPls.Enabled = isAdmin;
if (Custom.client_id_active == 1)
{
mtmEmpLed.Enabled = mtmEmpPay.Enabled = true;
mtmBankLed.Enabled = mtmBankTran.Enabled = true;
}
if (Custom.client_id_active == 7 || Custom.client_id_active == 15)
{
mtmProcess.Enabled = pnlManufacture.Enabled = isAdmin;
mtmProcessReview.Enabled = isAdmin;
}
else if (Custom.client_id_active == 6)
{
mtmPurchase.Enabled = lblPurchase.Enabled = pbPurchase.Enabled = mtmPurReview.Enabled = mtmPurRep.Enabled = isAdmin;
mtmSupLed.Enabled = isAdmin;
}
else if (Custom.client_id_active == 3)
{
mtmSaleReview.Enabled = isAdmin;
}
}
private void treeMain_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
string btnName = e.Node.Text;
switch (btnName)
{
case "Sale":
mtmSale_Click(sender, e);
break;
case "Sale Review":
mtmSaleReview_Click(sender, e);
break;
case "Purchase":
mtmPurchase_Click(sender, e);
break;
case "Purchase Review":
mtmPurReview_Click(sender, e);
break;
case "Stock Damage":
mtmDamage_Click(sender, e);
break;
case "Purchase Report":
mtmPurRep_Click(sender, e);
break;
case "Sale Report":
mtmSaleRep_Click(sender, e);
break;
case "Stock Report":
mtmStockRep_Click(sender, e);
break;
case "Product":
mtmProd_Click(sender, e);
break;
case "Bank":
mtmBank_Click(sender, e);
break;
case "Supplier":
mtmSupplier_Click(sender, e);
break;
case "Customer":
mtmCustomer_Click(sender, e);
break;
case "Customer Transactions":
mtmCusReciept_Click(sender, e);
break;
case "Supplier Transactions":
mtmSupPay_Click(sender, e);
break;
case "Bank Transactions":
mtmBankTran_Click(sender, e);
break;
case "Expense":
mtmExpense_Click(sender, e);
break;
case "General Journal":
mtmJournal_Click(sender, e);
break;
case "Cash Book":
mtmCashBook_Click(sender, e);
break;
case "Customer Ledger":
mtmCusLed_Click(sender, e);
break;
case "Supplier Ledger":
mtmSupLed_Click(sender, e);
break;
case "Trial Balance":
mtmTrialBal_Click(sender, e);
break;
case "Balance Sheet":
mtmBalSheet_Click(sender, e);
break;
case "Expiry Report":
mtmExpiryRep_Click(sender, e);
break;
case "Add New User":
mtmAddUser_Click(sender, e);
break;
case "Change Password":
mtmChangePass_Click(sender, e);
break;
}
}
private void mtmSale_Click(object sender, EventArgs e)
{
if (Custom.mod_fnb)
showFrm(new frmPlaceOrder());
else
showFrm(new frmSale());
if (pnlOrdersDisp.Visible && Custom.mod_manufact)
showOrdersOnDashboard();
}
private void pbSale_Click(object sender, EventArgs e)
{
mtmSale_Click(sender, e);
}
private void mtmSaleReview_Click(object sender, EventArgs e)
{
showFrm(new frmSaleReview());
}
private void mtmBank_Click(object sender, EventArgs e)
{
showFrm(new frmBank());
}
private void txtSrh_TextChanged(object sender, EventArgs e)
{
bool found = false;
string str = txtSrh.Text;
if (str.Length < 3)
return;
str = str.ToUpper();
string nodeName = "";
treeMain.CollapseAll();
foreach (TreeNode node in treeMain.Nodes)
{
foreach (TreeNode chield in node.Nodes)
{
nodeName = chield.Text.ToUpper();
if (nodeName.Contains(str))
{
treeMain.SelectedNode = chield;
treeMain.Focus();
found = true;
break;
}
}
if (found)
break;
}
}
private void mtmPurReview_Click(object sender, EventArgs e)
{
showFrm(new frmPurchaseReview());
}
private void mtmProd_Click(object sender, EventArgs e)
{
showFrm(new frmProducts());
}
private void mtmDamage_Click(object sender, EventArgs e)
{
showFrm(new frmDamage());
}
private void frmDashboard_Load(object sender, EventArgs e)
{
custom.Customize();
loadDashboardInfo();
resize();
customDashboard();
secureDashboard();
processes();
}
private void mtmPurchase_Click(object sender, EventArgs e)
{
showFrm(new frmPurchase());
}
private void pbPurchase_Click(object sender, EventArgs e)
{
mtmPurchase_Click(sender, e);
}
private void lnkPurchase_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
mtmPurchase_Click(sender, e);
}
private void lnkSale_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
mtmSale_Click(sender, e);
}
private void mtmAddUser_Click(object sender, EventArgs e)
{
showFrm(new frmUserInfo());
}
private void mtmChangePass_Click(object sender, EventArgs e)
{
showFrm(new frmChangePass());
}
private void mtmExit_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void lnkCusLedger_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
mtmCusReciept_Click(sender, e);
}
private void mtmSupPay_Click(object sender, EventArgs e)
{
showFrm(new frmSupplierTran());
}
private void mtmSupplier_Click(object sender, EventArgs e)
{
showFrm(new frmSuplier());
}
private void mtmBankTran_Click(object sender, EventArgs e)
{
showFrm(new frmBankTran());
}
private void mtmCustomer_Click(object sender, EventArgs e)
{
showFrm(new frmCustomer());
}
private void mtmExpType_Click(object sender, EventArgs e)
{
showFrm(new frmExpType());
}
private void mtmCusReciept_Click(object sender, EventArgs e)
{
showFrm(new frmCustomerTran());
}
private void lnkCusLedger_Click(object sender, EventArgs e)
{
mtmCusLed_Click(sender, e);
}
private void lnkPls_Click(object sender, EventArgs e)
{
mtmPls_Click(sender, e);
}
private void mtmExpense_Click(object sender, EventArgs e)
{
showFrm(new frmExpense());
}
private void pbCusLog_Click(object sender, EventArgs e)
{
mtmCusReciept_Click(sender, e);
}
private void lnkCusLog_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
mtmCusReciept_Click(sender, e);
}
private void pbExpense_Click(object sender, EventArgs e)
{
mtmExpense_Click(sender, e);
}
private void lnkExp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
mtmExpense_Click(sender, e);
}
private void mtmJournal_Click(object sender, EventArgs e)
{
showFrm(new frmJournal());
}
private void mtmCashBook_Click(object sender, EventArgs e)
{
showFrm(new frmCashbook());
}
private void mtmCusLed_Click(object sender, EventArgs e)
{
showFrm(new frmCusLed());
}
private void mtmSupLed_Click(object sender, EventArgs e)
{
showFrm(new frmSupLed());
}
private void mtmBankLed_Click(object sender, EventArgs e)
{
showFrm(new frmBnkLed());
}
private void mtmPls_Click(object sender, EventArgs e)
{
showFrm(new frmProfitLoss());
}
private void mtmTrialBal_Click(object sender, EventArgs e)
{
showFrm(new frmTrialBal());
}
private void mtmPurRep_Click(object sender, EventArgs e)
{
showFrm(new frmPurRep());
}
private void mtmSaleRep_Click(object sender, EventArgs e)
{
showFrm(new frmSaleRep());
}
private void mtmStockRep_Click(object sender, EventArgs e)
{
showFrm(new frmStockRep());
}
private void mtmEmpPay_Click(object sender, EventArgs e)
{
showFrm(new frmEmpTran());
}
private void lnkCashBook_Click(object sender, EventArgs e)
{
mtmCashBook_Click(sender, e);
}
private void mtmDraw_Click(object sender, EventArgs e)
{
showFrm(new frmDrawInvest());
}
private void mtmOrder_Click(object sender, EventArgs e)
{
showFrm(new frmOrders());
showOrdersOnDashboard();
}
private void mtmProcess_Click(object sender, EventArgs e)
{
showFrm(new frmProduction());
showOrdersOnDashboard();
}
private void pbOrder_Click(object sender, EventArgs e)
{
mtmOrder_Click(sender, e);
}
private void lnkOrder_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
mtmOrder_Click(sender, e);
}
private void pbProcess_Click(object sender, EventArgs e)
{
mtmProcess_Click(sender, e);
}
private void lnkProcess_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
mtmProcess_Click(sender, e);
}
private void mtmOrderRep_Click(object sender, EventArgs e)
{
}
private void mtmCusOrder_Click(object sender, EventArgs e)
{
mtmOrder_Click(sender, e);
}
private void mtmDayBook_Click(object sender, EventArgs e)
{
showFrm(new frmDayBook());
}
private void expenseReportToolStripMenuItem_Click(object sender, EventArgs e)
{
showFrm(new frmExpLedger());
}
private void pbDayBook_Click(object sender, EventArgs e)
{
mtmDayBook_Click(sender,e);
}
private void lnkDayBook_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
mtmDayBook_Click(sender, e);
}
private void mtmAtend_Click(object sender, EventArgs e)
{
showFrm( new frmAtendRep());
}
private void mtmDrawInvest_Click(object sender, EventArgs e)
{
showFrm(new frmDrawInvest());
}
private void mtmCoa_Click(object sender, EventArgs e)
{
showFrm(new frmCoa());
}
private void mtmProdType_Click(object sender, EventArgs e)
{
showFrm(new frmProductType());
}
private void mtmInbd_Click(object sender, EventArgs e)
{
showFrm(new frmInbound());
}
private void mtmEmpLed_Click(object sender, EventArgs e)
{
showFrm(new frmEmpLed());
}
private void mtmEmp_Click(object sender, EventArgs e)
{
showFrm(new frmEmp());
}
private void pbInbound_Click(object sender, EventArgs e)
{
mtmInbd_Click(sender, e);
}
private void lnkInbound_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
mtmInbd_Click(sender, e);
}
private void mtmBackup_Click(object sender, EventArgs e)
{
showFrm(new frmBackup());
}
private void mtmBalSheet_Click(object sender, EventArgs e)
{
showFrm(new frmBalSheet());
}
private void mtmExpiryRep_Click(object sender, EventArgs e)
{
showFrm(new frmExpiryRep());
}
private void lnkImei_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
showFrm(new frmImeiRep());
}
private void lnkPreviousInvoice_Click(object sender, EventArgs e)
{
showFrm(new frmSaleReceipt());
}
private void mtmOrderProg_Click(object sender, EventArgs e)
{
showFrm(new frmProgress());
}
private void mtmOrdAct_Click(object sender, EventArgs e)
{
showFrm(new frmOrderRepAct());
}
private void pbOrderActRep_Click(object sender, EventArgs e)
{
mtmOrdAct_Click(sender, e);
}
private void lnkActiveOrderRep_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
mtmOrdAct_Click(sender, e);
}
private void pbInvoice_Click(object sender, EventArgs e)
{
lnkPreviousInvoice_Click(sender, e);
}
private void productionReportToolStripMenuItem_Click(object sender, EventArgs e)
{
showFrm(new frmProductionReport());
}
private void lnlOrderRep_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
productionReportToolStripMenuItem_Click(sender, e);
}
private void pbProductionRep_Click(object sender, EventArgs e)
{
productionReportToolStripMenuItem_Click(sender, e);
}
private void mtmConsumeRep_Click(object sender, EventArgs e)
{
showFrm(new frmConsumeRep());
}
private void pbConsumeRep_Click(object sender, EventArgs e)
{
mtmConsumeRep_Click(sender, e);
}
private void lnkComsumeRep_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
mtmConsumeRep_Click(sender, e);
}
private void assetToolStripMenuItem_Click(object sender, EventArgs e)
{
showFrm(new frmAssets());
}
private void assetPurchaseToolStripMenuItem_Click(object sender, EventArgs e)
{
showFrm(new frmAssetPurchase());
}
private void barcodeGeneratorToolStripMenuItem_Click(object sender, EventArgs e)
{
showFrm(new frmBarcodeGen());
}
private void pbImei_Click(object sender, EventArgs e)
{
}
private void mtmInbdRep_Click(object sender, EventArgs e)
{
showFrm(new frmInboundRep());
}
private void mtmTables_Click(object sender, EventArgs e)
{
showFrm(new frmTable());
}
private void mtmFoodOrder_Click(object sender, EventArgs e)
{
showFrm(new frmPlaceOrder());
}
private void mtmFoodReview_Click(object sender, EventArgs e)
{
showFrm(new frmSaleReview());
}
private void mtmProcessReview_Click(object sender, EventArgs e)
{
showFrm(new frmProcessReview());
}
private void mtmComp_Click(object sender, EventArgs e)
{
showFrm(new frmComp());
}
private void mtmAtend_Click_1(object sender, EventArgs e)
{
showFrm(new frmEmpAtend());
}
private void mtmOrderReview_Click(object sender, EventArgs e)
{
showFrm(new frmOrderReview());
}
private void mtmAutoConsume_Click(object sender, EventArgs e)
{
showFrm(new frmAutoConsume());
}
private void mtmPriceList_Click(object sender, EventArgs e)
{
showFrm(new frmPriceList());
}
private void mtmCashFlow_Click(object sender, EventArgs e)
{
showFrm(new frmCashflow());
}
private void mtmCusVisitSum_Click(object sender, EventArgs e)
{
showFrm(new frmCusVisitSummary());
}
private void saleSummaryToolStripMenuItem_Click(object sender, EventArgs e)
{
showFrm(new frmSaleSummary());
}
private void mtmStkDis_Click(object sender, EventArgs e)
{
showFrm(new frmStockInOut());
}
private void mtmVehicle_Click(object sender, EventArgs e)
{
showFrm(new frmVeh());
}
private void mtmAutoConsumeS_Click(object sender, EventArgs e)
{
showFrm(new frmAutoConsume());
}
private void mtmShortStock_Click(object sender, EventArgs e)
{
showFrm(new frmShortStock());
}
private void mtmShortStockRep_Click(object sender, EventArgs e)
{
showFrm(new frmShortStockRep());
}
private void lnkCashBook_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
}
private void pnlRepCom_Paint(object sender, PaintEventArgs e)
{
}
private void mtmBankCheques_Click(object sender, EventArgs e)
{
showFrm(new frmCheques());
}
private void mtmConsume_Click(object sender, EventArgs e)
{
showFrm(new frmConsume());
}
private void switchUserToolStripMenuItem_Click(object sender, EventArgs e)
{
frmlogin log = new frmlogin();
log.ShowDialog();
if(User.login_success)
{
string tmpStr = "";
for (int i = Application.OpenForms.Count - 1; i >= 0; i--)
{
tmpStr = Application.OpenForms[i].Name;
if (tmpStr != "frmDashboard" && tmpStr != "frmSale")
Application.OpenForms[i].Close();
}
secureDashboard();
}
}
private void frmDashboard_Activated(object sender, EventArgs e)
{
if (Sale.toSwitch)
{
secureDashboard();
Sale.toSwitch = false;
}
}
private void mtmSupOrder_Click(object sender, EventArgs e)
{
showFrm(new frmSupplierOrders());
}
private void supplierOrdersReportToolStripMenuItem_Click(object sender, EventArgs e)
{
showFrm(new frmSupOrder() );
}
private void pbCashFlow_Click(object sender, EventArgs e)
{
mtmCashFlow_Click(sender, e);
}
private void lnkCashFlow_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
mtmCashFlow_Click(sender, e);
}
private void pnlPls_Paint(object sender, PaintEventArgs e)
{
}
private void lnkOrderProg_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
mtmOrderProg_Click(sender, e);
}
private void pbOrderProg_Click(object sender, EventArgs e)
{
mtmOrderProg_Click(sender, e);
}
private void label15_Click(object sender, EventArgs e)
{
}
private void lblPurchase_Click(object sender, EventArgs e)
{
mtmPurchase_Click(sender, e);
}
private void lblCusOrders_Click(object sender, EventArgs e)
{
mtmOrder_Click(sender, e);
}
private void lblSale_Click(object sender, EventArgs e)
{
mtmSale_Click(sender, e);
}
private void lblProcessing_Click(object sender, EventArgs e)
{
mtmProcess_Click(sender, e);
}
private void lblOrderProg_Click(object sender, EventArgs e)
{
mtmOrderProg_Click(sender, e);
}
private void lblCusTran_Click(object sender, EventArgs e)
{
mtmCusReciept_Click(sender, e);
}
private void lblExpense_Click(object sender, EventArgs e)
{
mtmExpense_Click(sender, e);
}
private void lblIEMI_Click(object sender, EventArgs e)
{
}
private void lblStore_Click(object sender, EventArgs e)
{
mtmInbd_Click(sender, e);
}
private void lblDayBook_Click(object sender, EventArgs e)
{
mtmDayBook_Click(sender, e);
}
private void lblCusLedger_Click(object sender, EventArgs e)
{
mtmCusLed_Click(sender, e);
}
private void lblCashFlow_Click(object sender, EventArgs e)
{
mtmCashFlow_Click(sender, e);
}
private void lblProfitLoss_Click(object sender, EventArgs e)
{
mtmPls_Click(sender, e);
}
private void lblActiveOrders_Click(object sender, EventArgs e)
{
mtmCusOrder_Click(sender, e);
}
private void lblProdRep_Click(object sender, EventArgs e)
{
}
private void lblConsumeRep_Click(object sender, EventArgs e)
{
mtmConsume_Click(sender, e);
}
private void lblInvoice_Click(object sender, EventArgs e)
{
mtmCusReciept_Click(sender, e);
}
private void mtmIMEI_Click(object sender, EventArgs e)
{
showFrm(new frmIMEI());