Ejemplo n.º 1
0
 private void barButtonItem_ToChuc_ItemClick(object sender, ItemClickEventArgs e)
 {
     if (formTenToChuc == null)
     {
         formTenToChuc             = new F_Main_TenToChuc();
         formTenToChuc.MdiParent   = this;
         formTenToChuc.FormClosed += new FormClosedEventHandler(formTenToChuc_FormClosed);
         formTenToChuc.Show();
     }
     else
     {
         formTenToChuc.Activate();
     }
 }
Ejemplo n.º 2
0
        public F_Main_ThemToChuc(F_Main_TenToChuc frm, string ma, int so)
        {
            InitializeComponent();
            sql   = F_DangNhap.SQL_con_object as SQLConnect;
            nguoi = F_DangNhap.person_object as NguoiDung;

            this.formTenToChuc = frm;
            this.maToChuc      = ma;
            this.soduan        = so;

            this.Text = "Chỉnh sửa thông tin tổ chức";
            string s = "SELECT [MaTochuc] ,[TenTochuc] ,[Diachi]  ,[Masothue] ,[Giamdoc] ,convert(NVARCHAR, NgayTL, 101) as NgayTL FROM [GIAODAT].[dbo].[TenTochuc] WHERE MaTochuc='" + ma + "' ";

            textEdit_maToChuc.Text          = sql.GetData(s, 0);
            textEdit_TenToChuc.Text         = sql.GetData(s, 1);
            textEdit_DiaChi.Text            = sql.GetData(s, 2);
            textEdit_MST.Text               = sql.GetData(s, 3);
            textEdit_GiamDoc.Text           = sql.GetData(s, 4);
            dateEdit_NgayThanhLap.EditValue = sql.GetData(s, 5);

            simpleButton_NhapLai.Enabled = false;
        }
Ejemplo n.º 3
0
 private void formTenToChuc_FormClosed(object sender, FormClosedEventArgs e)
 {
     formTenToChuc = null;
 }