Beispiel #1
0
        private void serachMembertextBox_TextChanged(object sender, EventArgs e)
        {
            try
            {
                signUpPictureBox.Visible = true;
                Account_BO ab = new Account_BO();
                member = ab.getMember(serachMembertextBox.Text);

                MemoryStream ms = new MemoryStream(member.image);
                signUpFirstNamemetroTextBox.Text = member.firstName;
                signUpLastNamemetroTextBox.Text = member.lastName;

                signUpEmailmetroTextBox.Text = member.email;
                signUpPhoneNoMetroTextBox.Text = member.phoneNo;
                signUpPictureBox.Image = Image.FromStream(ms);
                signUpSalarytextBox.Text = member.salary;

            }
            catch
            {

                signUpFirstNamemetroTextBox.Clear();
                signUpLastNamemetroTextBox.Clear();
                signUpEmailmetroTextBox.Clear();
                imagePath = "";

                signUpPictureBox.Visible = false;
                signUpPhoneNoMetroTextBox.Clear();
                signUpSalarytextBox.Clear();
                attendenceMetroGrid.DataSource = "";
                Attendence_Label.ResetText();
            }
        }
Beispiel #2
0
        private void Home_Admin_CreditHistoryBalance_Load(object sender, EventArgs e)
        {
            setFullScreen();
            setMainPanelPosition();
            setRightOptionPanel();
            right_option_timer.Start();

            try
            {
                Account_BO ab = new Account_BO();
                member = ab.getMember(userName);
                memberFirstNameMetroLabel.Text = member.firstName.ToString();
                memberLastNameMetroLabel.Text = member.lastName.ToString();
                MemoryStream ms = new MemoryStream(member.image);
                pictureBox.Image = Image.FromStream(ms);

            }
            catch
            {

            }
        }
        private void Home_Admin_ReturnToImporter_History_Load(object sender, EventArgs e)
        {
            setFullScreen();
            setMainPanelPosition();
            setRightOptionPanel();
            right_option_timer.Start();
            try
            {
                Account_BO ab = new Account_BO();
                member = ab.getMember(userName);
                memberFirstNameMetroLabel.Text = member.firstName.ToString();
                memberLastNameMetroLabel.Text = member.lastName.ToString();
                MemoryStream ms = new MemoryStream(member.image);
                pictureBox.Image = Image.FromStream(ms);
            }
            catch
            {

            }
            try
            {

                DataSet ds = account_Bo.getAllReturnProduct();
                if (ds != null)
                {
                    productMetroGrid.DataSource = ds.Tables[0];

                    if (productMetroGrid.Rows.Count > 1)
                    {
                        Mlabel.Text = (productMetroGrid.Rows.Count).ToString() + " results found";
                    }
                    else if (productMetroGrid.Rows.Count == 1)
                    {
                        Mlabel.Text = "1 result found";
                    }
                    else
                    {
                        Mlabel.Text = "No result found";
                    }
                }

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void Home_Admin_CreditHistory_Load(object sender, EventArgs e)
        {
            setFullScreen();
            setMainPanelPosition();
            setRightOptionPanel();
            right_option_timer.Start();

            try
            {
                Account_BO ab = new Account_BO();
                member = ab.getMember(userName);
                memberFirstNameMetroLabel.Text = member.firstName.ToString();
                memberLastNameMetroLabel.Text = member.lastName.ToString();
                MemoryStream ms = new MemoryStream(member.image);
                pictureBox.Image = Image.FromStream(ms);

                CreditHistory creditHistory = new CreditHistory();
                creditHistory.invoiceNo = invoiceNo_TextBox.Text;
                creditHistory.name = clientName_TextBox.Text;
                creditHistory.address = address_TextBox.Text;
                creditHistory.mobileNo = phoneNo_TextBox.Text;
                creditHistory.date = date_TextBox.Text;
                creditHistory.reference = userName_textBox.Text;
                DataSet ds = account_Bo.getCreditHistory(creditHistory);
                clientHistoryMetroGrid.DataSource = ds.Tables[0];

            }
            catch
            {

            }
        }
        private void Home_Admin_EntryNewProduct_Load(object sender, EventArgs e)
        {
            setFullScreen();
            setMainPanelPosition();
            setRightOptionPanel();
            right_option_timer.Start();

            try
            {

                Account_BO ab = new Account_BO();
                member = ab.getMember(userName);
                memberFirstNameMetroLabel.Text = member.firstName.ToString();
                memberLastNameMetroLabel.Text = member.lastName.ToString();
                MemoryStream ms = new MemoryStream(member.image);
                pictureBox.Image = Image.FromStream(ms);

                //explorer = new PosExplorer();

                //scannerList1 = explorer.GetDevices();
                //bsDevices.DataSource = scannerList1;
                //cboDevices.DisplayMember = scannerList1.ToString();

                //scannerList = explorer.GetDevices(DeviceType.Scanner);
                //devicesBinidingSource.DataSource = scannerList;
                //lstDevices.DisplayMember = scannerList.ToString();

            }
            catch (Exception ex)
            {

            }
        }
        private void Home_Admin_TotalMember_Load(object sender, EventArgs e)
        {
            setFullScreen();
            setMainPanelPosition();
            setRightOptionPanel();
            right_option_timer.Start();

            try
            {
                Account_BO ab = new Account_BO();
                member = ab.getMember(userName);
                memberFirstNameMetroLabel.Text = member.firstName.ToString();
                memberLastNameMetroLabel.Text = member.lastName.ToString();
                MemoryStream ms = new MemoryStream(member.image);
                pictureBox.Image = Image.FromStream(ms);
                DataSet ds = account_Bo.getAllMember();
                memberMetroGrid.DataSource = ds.Tables[0];

                if (memberMetroGrid.Rows.Count > 1)
                {
                    Mlabel.Text = (memberMetroGrid.Rows.Count).ToString() + " results found";
                }
                else if (memberMetroGrid.Rows.Count == 1)
                {
                    Mlabel.Text = "1 result found";
                }
                else
                {
                    Mlabel.Text = "No result found";
                }
            }
            catch
            {

            }
        }
Beispiel #7
0
 private void Home_Admin_Load(object sender, EventArgs e)
 {
     setFullScreen();
     setMainPanelPosition();
     setRightOptionPanel();
     right_option_timer.Start();
     try
     {
         Account_BO ab = new Account_BO();
         member = ab.getMember(userName.ToString());
         memberNameMetroLabel.Text = member.firstName.ToString();
         memberTypeMetroLabel.Text = member.lastName.ToString();
         MemoryStream ms = new MemoryStream(member.image);
         pictureBox.Image = Image.FromStream(ms);
         pictureBox18.Image = Image.FromStream(ms);
         metroLabel4.Text = member.firstName.ToString();
         metroLabel3.Text = member.lastName.ToString();
         if(i==0)
         {
             soundPlay();
             i = 1;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
        private void Home_Admin_NotesAndReminder_Load(object sender, EventArgs e)
        {
            setFullScreen();
            setMainPanelPosition();
            setRightOptionPanel();
            right_option_timer.Start();

            try
            {
                Account_BO ab = new Account_BO();
                member = ab.getMember(userName);
                memberFirstNameMetroLabel.Text = member.firstName.ToString();
                memberLastNameMetroLabel.Text = member.lastName.ToString();
                MemoryStream ms = new MemoryStream(member.image);
                pictureBox.Image = Image.FromStream(ms);
            }
            catch
            {

            }
            try
            {
                Note note = new Note();
                note.date = last_dateTimePicker.Text;
                note.userName = userName;
                DataSet ds = account_Bo.getNote(note);
                historyGrid.DataSource = ds.Tables[0];
            }
            catch
            {

            }
        }
        private void SerachMembertextBox_TextChanged(object sender, EventArgs e)
        {
            try
            {
                signUpPictureBox.Visible = true;
                Account_BO ab = new Account_BO();
                member = ab.getMember(serachMembertextBox.Text);
                //memberFirstNameMetroLabel.Text = member.firstName.ToString();
               // memberLastNameMetroLabel.Text = member.lastName.ToString();
                MemoryStream ms = new MemoryStream(member.image);
                //pictureBox.Image = Image.FromStream(ms);
                signUpFirstNamemetroTextBox.Text = member.firstName;
                signUpLastNamemetroTextBox.Text = member.lastName;
                signUpGendermetroComboBox.Text = member.gender;
                signUpDOBmetroDateTime.Text = member.DOB;
                signUpEmailmetroTextBox.Text = member.email;
                signUpPhoneNoMetroTextBox.Text = member.phoneNo;
                signUpPictureBox.Image = Image.FromStream(ms);
                signUpSalarytextBox.Text = member.salary;
                signUpUserNamemetroTextBox.Text = member.userName;

            }
            catch
            {
                signUpFirstNamemetroTextBox.Clear();
                signUpLastNamemetroTextBox.Clear();
                signUpGendermetroComboBox.ResetText();
                signUpDOBmetroDateTime.ResetText();
                signUpEmailmetroTextBox.Clear();
                signUpUserNamemetroTextBox.Clear();
                signUpPasswordmetroTextBox.Clear();
                signUpRepeatPasswordmetroTextBox.Clear();
                imagePath = "";
                signUpPictureBox.Visible = false;
                signUpPhoneNoMetroTextBox.Clear();
                signUpSalarytextBox.Clear();
            }
        }
Beispiel #10
0
        private void Home_Admin_SearchProduct_Load(object sender, EventArgs e)
        {
            setFullScreen();
            setMainPanelPosition();
            setRightOptionPanel();
            right_option_timer.Start();
            delete_Button.Enabled = false;
            update_btn.Enabled = false;

            try
            {
                Account_BO ab = new Account_BO();
                member = ab.getMember(userName);
                memberFirstNameMetroLabel.Text = member.firstName.ToString();
                memberLastNameMetroLabel.Text = member.lastName.ToString();
                MemoryStream ms = new MemoryStream(member.image);
                pictureBox.Image = Image.FromStream(ms);

            }
            catch (Exception ex)
            {

            }
        }
        private void Home_Admin_ManageClient_Load(object sender, EventArgs e)
        {
            setFullScreen();
            setMainPanelPosition();
            setRightOptionPanel();
            right_option_timer.Start();

            try
            {
                Account_BO ab = new Account_BO();
                member = ab.getMember(userName);
                memberFirstNameMetroLabel.Text = member.firstName.ToString();
                memberLastNameMetroLabel.Text = member.lastName.ToString();
                MemoryStream ms = new MemoryStream(member.image);
                pictureBox.Image = Image.FromStream(ms);
                DataSet ds = account_Bo.getAllClient();
                clientMetroGrid.DataSource = ds.Tables[0];
            }
            catch
            {

            }
        }