コード例 #1
0
        private void Form_ModifyAccount_Load(object sender, EventArgs e)
        {
            Class_Info adt         = new Class_Info();
            DataTable  Accountdata = adt.ViewAccountTable();

            if (Accountdata.Rows.Count != 0)
            {
                Dgv_Acc.DataSource = Accountdata;
            }

            Class_Info edt     = new Class_Info();
            DataTable  Empdata = edt.ViewEmployeeTable();

            if (Empdata.Rows.Count != 0)
            {
                Dgv_Emp.DataSource = Empdata;
            }

            Class_Info cdt     = new Class_Info();
            DataTable  Cusdata = cdt.ViewCustomerTable();

            if (Cusdata.Rows.Count != 0)
            {
                Dgv_Cus.DataSource = Cusdata;
            }
        }
コード例 #2
0
        private void Form_ViewInfo_Load(object sender, EventArgs e)
        {
            Class_Info view = new Class_Info();
            DataTable  data = view.ViewInfo(Class_Login.AccountId);

            if (data.Rows.Count != 0)
            {
                dataGridView1.DataSource = data;
            }
        }
コード例 #3
0
        private void Btn_Savechanges_Click(object sender, EventArgs e)
        {
            Class_Info updateinfo = new Class_Info();
            int        result     = updateinfo.UpdateContactinfo(Tb_PhoneData.Text, Tb_AddressData.Text, Class_Login.AccountId);

            if (result == 1)
            {
                Lbl_Status.ForeColor = System.Drawing.Color.Green;
                Lbl_Status.Text      = "Changes were Saved Successfully!";
            }
        }