Beispiel #1
0
        public void PopulateDataFromLogin(string Values)
        {
            TBikeDAL  MyDAL       = new TBikeDAL();
            DataTable ResultTable = MyDAL.SelectEmployeeID("", Values);


            if (ResultTable.Rows.Count > 0)
            {
                TLUsername.Text = Convert.ToString(ResultTable.Rows[0]["EmployeeName"]).Trim();
                TLRankDesc.Text = Convert.ToString(ResultTable.Rows[0]["EmployeeRankDesc"]).Trim();
                username        = Convert.ToString(ResultTable.Rows[0]["Username"]).Trim();
                RankID          = Convert.ToInt32(ResultTable.Rows[0]["EmployeeRank"]);
                if (RankID < 2)
                {
                    ExpanderEmployee.AllowDrop = false;
                    ExpanderEmployee.IsEnabled = false;

                    ExpanderReports.IsEnabled = false;
                    ExpanderStore.IsEnabled   = false;
                }
                Framework.Visibility = Visibility.Visible;
                FinalizeReports search = new FinalizeReports();
                search.RankID     = RankID;
                search.username   = username;
                Framework.Content = search.Content;
            }
        }
Beispiel #2
0
        private void BtnHome_Click(object sender, RoutedEventArgs e)
        {
            Notification();
            TBikeDAL MyDAL = new TBikeDAL();

            dataGrid1.Visibility = Visibility.Collapsed;
            Framework.Visibility = Visibility.Visible;
            FinalizeReports search = new FinalizeReports();

            search.PopulateDataFromLogin(username);
            Framework.Content = search.Content;
        }