Esempio n. 1
0
        private void navBar_raporList_Click(object sender, EventArgs e)
        {
            ExceptionCatcher.ExceptionFinder(() =>
            {
                RibbonPageGroup_Home.IsEnabled = false;
                UCReport          = new UCReport();
                DXTabItem tabItem = new DXTabItem()
                {
                    Header     = navBar_raporList.Content,
                    Content    = UCReport,
                    AllowHide  = DevExpress.Utils.DefaultBoolean.True,
                    IsSelected = true
                };

                foreach (DXTabItem item in TabControlMain.Items)
                {
                    if (item.Header == navBar_raporList.Content)
                    {
                        TabControlMain.RemoveTabItem(item);
                        break;
                    }
                }
                TabControlMain.Items.Add(tabItem);
            });
        }
 private void BtnReport_Click(object sender, RoutedEventArgs e)
 {
     if (uCReport == null)
     {
         UserControllCall.Add(Grd_Content, uCReport = new UCReport());
     }
     else
     {
         UserControllCall.Add(Grd_Content, uCReport);
     }
 }
Esempio n. 3
0
        private void ucReportTitle_Click(object sender, EventArgs e)
        {
            UCReport ucReport = (UCReport)sender;
            int      tag      = Convert.ToInt32(ucReport.Tag);

            foreach (Control ctr in flpReport.Controls)
            {
                if (ctr.BackColor == Color.FromArgb(0, 102, 204))
                {
                    ctr.BackColor = Color.FromArgb(255, 255, 255);
                    ctr.ForeColor = Color.FromArgb(51, 51, 51);
                }
            }
            ucReport.BackColor = Color.FromArgb(0, 102, 204);
            ucReport.ForeColor = Color.FromArgb(255, 255, 255);

            switch (tag)
            {
            case 1:
                pDetail.Controls.Clear();
                flpReportList.Controls.Clear();
                LoadShiftReport();
                break;

            case 2:
                pDetail.Controls.Clear();
                flpReportList.Controls.Clear();
                LoadReportDaiLy();
                break;

            case 3:
                pDetail.Controls.Clear();
                flpReportList.Controls.Clear();
                LoadReportWekky();
                break;

            case 4:
                pDetail.Controls.Clear();
                flpReportList.Controls.Clear();
                VoidItemAngOrderCancel();
                break;

            default:
                pDetail.Controls.Clear();
                flpReportList.Controls.Clear();
                break;
            }
        }
Esempio n. 4
0
 private void LoadTitleReport()
 {
     try
     {
         flpReport.Controls.Clear();
         string[] str = { "Shift report", "Daily Sale report", "Weekly report", "Void Item/Cancel Order" };
         int      i   = 1;
         foreach (string strReport in str)
         {
             UCReport ucReportTitle = new UCReport();
             ucReportTitle.lblTitleReport.Text = strReport;
             ucReportTitle.Width  = flpReport.Width;
             ucReportTitle.Click += ucReportTitle_Click;
             ucReportTitle.Tag    = i;
             i++;
             flpReport.Controls.Add(ucReportTitle);
         }
     }
     catch (Exception ex)
     {
         LogPOS.WriteLog("frmReport:::::::::::::::::::::::::LoadTitleReport:::::::::::::::::" + ex.Message);
     }
 }