Ejemplo n.º 1
0
        private void btnCustomer_click(object sender, EventArgs e)
        {
            Customers_AddUpdate add = new Customers_AddUpdate();

            add.ShowDialog();
            LoadData(DBManager.currentRecordId);
        }
Ejemplo n.º 2
0
        private void ShowUpdateInfoDialog()
        {
            Customers_AddUpdate add = new Customers_AddUpdate();

            add.customerId     = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells[0].Value);
            add.txtCustNo.Text = dataGridView1.SelectedRows[0].Cells[1].Value.ToString();
            add.txtName.Text   = dataGridView1.SelectedRows[0].Cells[2].Value.ToString();
            // add.txtFFtier.Text = dataGridView1.SelectedRows[0].Cells[4].Value.ToString();
            // add.chkCoop.Checked = Convert.ToBoolean(dataGridView1.SelectedRows[0].Cells[3].Value);
            // add.txtPrice.Text = dataGridView1.SelectedRows[0].Cells[5].Value.ToString();
            add.btnAdd.Text       = "Update";
            add.lblAddUpdate.Text = "Update Customer Information";
            add.ShowDialog();
        }
Ejemplo n.º 3
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Customers_AddUpdate add = new Customers_AddUpdate();

            //this.Hide();
            add.ShowDialog();
            ////DBManager.ExecuteNonQuery("insertA");
            //String str = System.Configuration.ConfigurationManager.ConnectionStrings["NFFM"].ConnectionString;
            //SqlConnection con = new SqlConnection(str);
            //SqlCommand cmd = new SqlCommand("Customers_Add", con);
            //cmd.CommandType = CommandType.StoredProcedure;
            //cmd.Parameters.Add("CustomerNo", txtCustNo.Text);
            //cmd.Parameters.Add("Name", txtName.Text);
            //cmd.Parameters.Add("FFTier", txtFFtier.Text);
            //cmd.Parameters.Add("IsCoop", chkCoop.Checked);
            //cmd.Parameters.Add("Price", txtPrice.Text);
            //con.Open();
            //cmd.ExecuteNonQuery();
            //con.Close();
            //ResetFields();
            //LoadData();
        }