Example #1
0
        private void RadButton_Click(object sender, RoutedEventArgs e)
        {
            UserNameTxt.Text = "";
            UserMasterDAO userMasterDaoRef = new UserMasterDAOImpl();
            List <string> listNm           = new List <string>();

            listNm.Add("user Id");
            listNm.Add("User Name");
            listNm.Add("Mobile No");
            listNm.Add("Address");
            listNm.Add("gender");
            listNm.Add("Email Id");
            listNm.Add("DOB");
            listNm.Add("password");
            listNm.Add("designation");
            // List<List<string>> itemList = new List<List<string>>();
            List <ArrayList> usrList = new List <ArrayList>();

            usrList = userMasterDaoRef.getUsrList(null);

            DataTable dt = CreateDataTable(listNm, usrList);

            dataGridUser.ItemsSource = dt.DefaultView;

            dataGridUser.Columns[0].IsReadOnly = true;
            dataGridUser.Columns[1].IsReadOnly = false;
            dataGridUser.Columns[2].IsReadOnly = false;
            dataGridUser.Columns[3].IsReadOnly = false;
            dataGridUser.Columns[4].IsReadOnly = false;
            dataGridUser.Columns[5].IsReadOnly = false;
            dataGridUser.Columns[6].IsReadOnly = false;
            dataGridUser.Columns[7].IsReadOnly = false;
            dataGridUser.Columns[8].IsReadOnly = true;
        }
Example #2
0
        private void findAllbtn_Click(object sender, EventArgs e)
        {
            UserMasterDao userMasterDaoRef = new UserMasterDAOImpl();
            List <string> listNm           = new List <string>();

            listNm.Add("user Id");
            listNm.Add("User Name");
            listNm.Add("Mobile No");
            listNm.Add("Address");
            listNm.Add("gender");
            listNm.Add("Email Id");
            listNm.Add("DOB");
            listNm.Add("password");
            listNm.Add("designation");
            // List<List<string>> itemList = new List<List<string>>();
            List <ArrayList> usrList = new List <ArrayList>();

            usrList = userMasterDaoRef.getUsrList(null);

            dataGridVieweditUsr.DataSource                      = CreateDataTable(listNm, usrList);
            dataGridVieweditUsr.Columns[0].ReadOnly             = true;
            dataGridVieweditUsr.Columns[1].ReadOnly             = false;
            dataGridVieweditUsr.Columns[2].ReadOnly             = false;
            dataGridVieweditUsr.Columns[3].ReadOnly             = false;
            dataGridVieweditUsr.Columns[4].ReadOnly             = false;
            dataGridVieweditUsr.Columns[5].ReadOnly             = false;
            dataGridVieweditUsr.Columns[6].ReadOnly             = false;
            dataGridVieweditUsr.Columns[7].ReadOnly             = false;
            dataGridVieweditUsr.Columns[8].ReadOnly             = true;
            dataGridVieweditUsr.FirstDisplayedScrollingRowIndex = dataGridVieweditUsr.RowCount - 1;
            //dataGridVieweditUsr.FirstDisplayedScrollingRowIndex = dataGridVieweditUsr.ColumnCount - 1;
        }
Example #3
0
        private void searchRoleNameBtn_Click_1(object sender, RoutedEventArgs e)
        {
            if (roleNameTxt.Text.Trim() == "")
            {
                MessageBox.Show("Please enter Role name !");
            }
            UserNameTxt.Text = "";
            UserMaster usrmasterRef = new UserMaster();

            usrmasterRef.username = null;
            RoleMaster rolemasterRef = new RoleMaster();

            rolemasterRef.roleName      = roleNameTxt.Text.Trim();
            usrmasterRef.designationRef = rolemasterRef;
            UserMasterDAO userMasterDaoRef = new UserMasterDAOImpl();
            List <string> listNm           = new List <string>();

            listNm.Add("user Id");
            listNm.Add("User Name");
            listNm.Add("Mobile No");
            listNm.Add("Address");
            listNm.Add("gender");
            listNm.Add("Email Id");
            listNm.Add("DOB");
            listNm.Add("password");
            listNm.Add("designation");
            List <List <string> > itemList = new List <List <string> >();
            List <ArrayList>      usrList  = new List <ArrayList>();

            usrList = userMasterDaoRef.getUsrList(usrmasterRef);

            DataTable dt = CreateDataTable(listNm, usrList);

            dataGridUser.ItemsSource = dt.DefaultView;

            dataGridUser.Columns[0].IsReadOnly = true;
            dataGridUser.Columns[1].IsReadOnly = false;
            dataGridUser.Columns[2].IsReadOnly = false;
            dataGridUser.Columns[3].IsReadOnly = false;
            dataGridUser.Columns[4].IsReadOnly = false;
            dataGridUser.Columns[5].IsReadOnly = false;
            dataGridUser.Columns[6].IsReadOnly = false;
            dataGridUser.Columns[7].IsReadOnly = false;
            dataGridUser.Columns[8].IsReadOnly = true;
            UserNameTxt.Text = "";
        }
Example #4
0
        private void searchUserNameBtn_Click_1(object sender, RoutedEventArgs e)
        {
            if (UserNameTxt.Text.Trim() == "")
            {
                MessageBox.Show("Please enter user name!");
            }
            else
            {
                UserMaster usrmasterRef = new UserMaster();
                usrmasterRef.username = UserNameTxt.Text.Trim();

                RoleMaster rolemasterRef = new RoleMaster();
                rolemasterRef.roleName      = null;
                usrmasterRef.designationRef = rolemasterRef;
                UserMasterDAO userMasterDaoRef = new UserMasterDAOImpl();
                List <string> listNm           = new List <string>();
                listNm.Add("user Id");
                listNm.Add("User Name");
                listNm.Add("Mobile No");
                listNm.Add("Address");
                listNm.Add("gender");
                listNm.Add("Email Id");
                listNm.Add("DOB");
                listNm.Add("password");
                listNm.Add("designation");
                List <List <string> > itemList = new List <List <string> >();
                List <ArrayList>      usrList  = new List <ArrayList>();
                usrList = userMasterDaoRef.getUsrList(usrmasterRef);
                if (usrList.Count == 0)
                {
                    Console.WriteLine("inside if null");
                    QRCodeBtn.Visibility     = Visibility.Hidden;
                    dataGridUser.ItemsSource = null;
                    image1.Visibility        = Visibility.Hidden;
                }

                else
                {
                    Console.WriteLine("inside else null");
                    DataTable dt = CreateDataTable(listNm, usrList);
                    dataGridUser.ItemsSource = dt.DefaultView;
                }
            }
        }
Example #5
0
        private void searchdesgBtn_Click(object sender, EventArgs e)
        {
            UserMaster usrmasterRef = new UserMaster();

            usrmasterRef.username = "";
            RoleMaster rolemasterRef = new RoleMaster();

            rolemasterRef.roleName = searchdesgTxt.Text;
            Console.WriteLine("inside else if \nRole Name:{0}", rolemasterRef.roleName);
            usrmasterRef.designationRef = rolemasterRef;
            Console.WriteLine("in user edit \nRole Name:{0}", usrmasterRef.designationRef.roleName);
            UserMasterDao userMasterDaoRef = new UserMasterDAOImpl();
            List <string> listNm           = new List <string>();

            listNm.Add("user Id");
            listNm.Add("User Name");
            listNm.Add("Mobile No");
            listNm.Add("Address");
            listNm.Add("gender");
            listNm.Add("Email Id");
            listNm.Add("DOB");
            listNm.Add("password");
            listNm.Add("designation");
            // List<List<string>> itemList = new List<List<string>>();
            List <ArrayList> usrList = new List <ArrayList>();

            usrList = userMasterDaoRef.getUsrList(usrmasterRef);

            dataGridVieweditUsr.DataSource                      = CreateDataTable(listNm, usrList);
            dataGridVieweditUsr.Columns[0].ReadOnly             = true;
            dataGridVieweditUsr.Columns[1].ReadOnly             = false;
            dataGridVieweditUsr.Columns[2].ReadOnly             = false;
            dataGridVieweditUsr.Columns[3].ReadOnly             = false;
            dataGridVieweditUsr.Columns[4].ReadOnly             = false;
            dataGridVieweditUsr.Columns[5].ReadOnly             = false;
            dataGridVieweditUsr.Columns[6].ReadOnly             = false;
            dataGridVieweditUsr.Columns[7].ReadOnly             = false;
            dataGridVieweditUsr.Columns[8].ReadOnly             = true;
            dataGridVieweditUsr.FirstDisplayedScrollingRowIndex = dataGridVieweditUsr.RowCount - 1;
            //    dataGridVieweditUsr.FirstDisplayedScrollingRowIndex = dataGridVieweditUsr.ColumnCount - 1;
        }