コード例 #1
0
ファイル: ucPhong.cs プロジェクト: nngocit/strix
        public void DanhSachTruongLoadAll()
        {
            DataTable dt = new DataTable(null);

            dt = _th.TruongHocLoadAll(ref err);
            superGridControl1.PrimaryGrid.Rows.Clear();
            lblsoluong.Text = dt.Rows.Count.ToString();
            if (dt.Rows.Count > 0)
            {
                superGridControl1.PrimaryGrid.DataSource = dt;
            }
            context = ((DataTable)dt).DefaultView;
            try
            {
                txttentruong.DataBindings.Add(new Binding("Text", context, "NAME"));
                txtdiachi.DataBindings.Add(new Binding("Text", context, "ADDRESSs"));
                txtsdt.DataBindings.Add(new Binding("Text", context, "PHONES"));
                // combongaythang.DataBindings.Add(new Binding("Text", context, "DAY_INF"));
                lblidtruong.DataBindings.Add(new Binding("Text", context, "SCHOOL"));
            }
            catch (Exception e)
            {
                //timer1.Start();
                //ToastNotification.Show(this, "Đang tải danh sách", null, 5000, (eToastGlowColor)eToastGlowColor.Blue, (eToastPosition)eToastPosition.BottomRight);
                var phong = new ucPhong();
                cls_Main.LoadUserControl2(cls_Controls._pn_Hienthi, phong);
            }
        }
コード例 #2
0
        private void lbldoanhthu_Click(object sender, EventArgs e)
        {
            var phongtruong = new ucPhong();

            cls_Main.LoadUserControl2(cls_Controls._pn_Hienthi, phongtruong);
        }