Exemplo n.º 1
0
        private void simpleButton4_Click(object sender, EventArgs e)
        {
            FRM_CUST_ADD frm_cust_add = new FRM_CUST_ADD();

            frm_cust_add.id           = 0;
            frm_cust_add.btn_add.Text = "اضافة";
            frm_cust_add.Show();
        }
        private void btn_add_supp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            FRM_CUST_ADD frm_cust_add = new FRM_CUST_ADD();

            frm_cust_add.id           = 0;
            frm_cust_add.btn_add.Text = "اضافة";
            frm_cust_add.Show();
        }
Exemplo n.º 3
0
        private void btn_edit_Click(object sender, EventArgs e)
        {
            FRM_CUST_ADD frm_cust_add = new FRM_CUST_ADD();

            id      = Convert.ToInt32(tileView1.GetFocusedRowCellValue("ID_CUST"));
            tb_cust = dbs.TB_CUST.Where(x => x.ID_CUST == id).FirstOrDefault();
            frm_cust_add.txt_Name.Text  = tb_cust.CUST_NAME.ToString();
            frm_cust_add.txt_phone.Text = tb_cust.CUST_PHONE.ToString();
            frm_cust_add.txt_email.Text = tb_cust.CUST_EMAIL.ToString();
            model_pic.by = tb_cust.CUST_IMAGE;
            frm_cust_add.pic_cust.Image = Image.FromStream(model_pic.Convert_Img());
            frm_cust_add.id             = id;
            frm_cust_add.btn_add.Text   = "التعديل";
            frm_cust_add.Show();
        }