Exemple #1
0
 private void btn_add_Click(object sender, EventArgs e)
 {
     PL.FRM_CUS_ADD frm_add = new FRM_CUS_ADD();
     frm_add.id           = 0;
     frm_add.btn_add.Text = "اضافة";
     frm_add.Show();
 }
Exemple #2
0
        //edit
        private void btn_edit_Click(object sender, EventArgs e)
        {
            PL.FRM_CUS_ADD frm_add = new FRM_CUS_ADD();
            id     = Convert.ToInt32(tileView1.GetFocusedRowCellValue("ID"));
            tb_sup = db.TB_CUS.Where(x => x.ID == id).FirstOrDefault();
            frm_add.edt_name.Text   = tb_sup.Sup_Name.ToString();
            frm_add.edt_phone.Text  = tb_sup.Sup_Phone.ToString();
            frm_add.edt_email.Text  = tb_sup.Sup_Email.ToString();
            methods.by              = tb_sup.Sup_image;
            frm_add.pic_cover.Image = Image.FromStream(methods.convert_image());

            frm_add.id           = id;
            frm_add.btn_add.Text = "تعديل";
            frm_add.Show();
        }