private void EditGiaDinhRow() { if (gxGiaoHoList1.CurrentRow == null) { return; } frmGiaDinhList frm = new frmGiaDinhList(); frm.Operation = GxOperation.EDIT; DataRow row = (gxGiaoHoList1.CurrentRow.DataRow as DataRowView).Row; frm.Id = (int)row[GiaoHoConst.MaGiaoHo]; if (frm.ShowDialog() == DialogResult.OK) { //If change grid value, write code here } }
private void gxCommand1_OnOK(object sender, EventArgs e) { string where = " WHERE GiaoDan.HoTen LIKE ? "; if (cbGiaoHo.MaGiaoHo > -1) { where += " AND GiaDinh.MaGiaoHo=" + cbGiaoHo.MaGiaoHo.ToString(); } frmGiaDinhList frm = new frmGiaDinhList(); //frm.LoadGiaDinhList(string.Format(SqlConstants.SELECT_GIADINH_GIAODAN, where), new object[] { "%" + txtTuKhoa.Text.Replace("\"", "") + "%" }); frm.QueryString = string.Format(SqlConstants.SELECT_GIADINH_GIAODAN, where); frm.Arguments = new object[] { "%" + txtTuKhoa.Text.Replace("\"", "") + "%" }; if (cbGiaoHo.MaGiaoHo > -1) { frm.MaGiaoHo = cbGiaoHo.MaGiaoHo; } Memory.Instance.SetMemory(GxConstants.DangTimKiemGiaDinhGiaoDan, 1); Dispatcher.ShowTab(frm); this.DialogResult = DialogResult.OK; }
private void frmReplace_OnOK(object sender, EventArgs e) { if ((int)sender <= 0) { return; } if (frmReplace.TableName == GiaoDanConst.TableName) { frmGiaoDanList frm = new frmGiaoDanList(); frm.GiaoDanList.WhereSQL = frmReplace.WhereSQL; frm.GiaoDanList.LoadData(SqlConstants.SELECT_GIAODAN_LIST_CO_GIAOHO, null); ShowForm(frm); } else if (frmReplace.TableName == GiaDinhConst.TableName) { frmGiaDinhList frm = new frmGiaDinhList(); frm.GiaDinhList.WhereSQL = frmReplace.WhereSQL; frm.GiaDinhList.LoadData(SqlConstants.SELECT_GIADINH_LIST, null); ShowForm(frm); } }
private void buttonBar1_ItemClick(object sender, Janus.Windows.ButtonBar.ItemEventArgs e) { if (e.Item.Key == "itNhapGiaoHo") { frmGiaoHo frm = new frmGiaoHo(); ShowForm(frm); } else if (e.Item.Key == "itNhapGiaoDan") { frmGiaoDanList frm = new frmGiaoDanList(); ShowForm(frm); } else if (e.Item.Key == "itNhapGiaDinh") { frmGiaDinhList frm = new frmGiaDinhList(); ShowForm(frm); } else if (e.Item.Key == "itNhapGiaoXu") { frmGiaoXu frm = new frmGiaoXu(); ShowForm(frm); } else if (e.Item.Key == "itSoBiTich") { frmDotBiTichList frm = new frmDotBiTichList(); ShowForm(frm); } else if (e.Item.Key == "itThongKeChung") { frmThongKeChung frm = new frmThongKeChung(); ShowForm(frm); } else if (e.Item.Key == "itLuuTruGiaoDan") { frmGiaoDanLuuTruList frm = new frmGiaoDanLuuTruList(); ShowForm(frm); } else if (e.Item.Key == "itLuuTruGiaDinh") { frmGiaDinhLuuTruList frm = new frmGiaDinhLuuTruList(); ShowForm(frm); } else if (e.Item.Key == "itTimGiaoDan") { frmTimGiaoDan.ShowDialog(); } else if (e.Item.Key == "itTimGiaDinhCuaGiaoDan") { frmTimGiaDinh.ShowDialog(); } else if (e.Item.Key == "itTimThayThe") { frmReplace.ShowDialog(); } else if (e.Item.Key == "itKiemTraGiaoDan") { frmKiemTraGiaoDanList frm = new frmKiemTraGiaoDanList(); ShowForm(frm); } else if (e.Item.Key == "itKiemTraGiaDinh") { frmKiemTraGiaDinhList frm = new frmKiemTraGiaDinhList(); ShowForm(frm); } }
private void button1_Click(object sender, EventArgs e) { frmGiaDinhList frm = new frmGiaDinhList(); frm.Show(); }
private void LoadFunction(string key) { if (key == "itNhapGiaoHo") { frmGiaoHo frm = new frmGiaoHo(); ShowForm(frm); } else if (key == "itNhapGiaoDan") { frmGiaoDanList frm = new frmGiaoDanList(); ShowForm(frm); } else if (key == "itNhapGiaDinh") { frmGiaDinhList frm = new frmGiaDinhList(); ShowForm(frm); } else if (key == "itNhapGiaoXu") { frmGiaoXu frm = new frmGiaoXu(); ShowForm(frm); } else if (key == "itSoBiTich") { frmDotBiTichList frm = new frmDotBiTichList(); ShowForm(frm); } else if (key == "itThongKeChung") { frmThongKeChung frm = new frmThongKeChung(); ShowForm(frm); } else if (key == "itLuuTruGiaoDan") { frmGiaoDanLuuTruList frm = new frmGiaoDanLuuTruList(); ShowForm(frm); } else if (key == "itLuuTruGiaDinh") { frmGiaDinhLuuTruList frm = new frmGiaDinhLuuTruList(); ShowForm(frm); } else if (key == "itTimGiaoDan") { frmTimGiaoDan.ShowDialog(); } else if (key == "itTimGiaDinhCuaGiaoDan") { frmTimGiaDinh.ShowDialog(); } else if (key == "itTimThayThe") { frmReplace.ShowDialog(); } else if (key == "itKiemTraGiaoDan") { frmKiemTraGiaoDanList frm = new frmKiemTraGiaoDanList(); ShowForm(frm); } else if (key == "itKiemTraGiaDinh") { frmKiemTraGiaDinhList frm = new frmKiemTraGiaDinhList(); ShowForm(frm); } else if (key == "itKiemTraPhienBan") { GxCheckVersion checkVersion = new GxCheckVersion(); checkVersion.Alert = true; checkVersion.OnFinished += new EventHandler(checkVersion_OnFinished); checkVersion.Execute(); } else if (key == "itAboutUs") { frmAbout frm = new frmAbout(); frm.ShowDialog(); } else if (key == "itGopY") { //frmGopY frm = new frmGopY(); //frm.ShowDialog(); try { //System.Diagnostics.Process.Start(Memory.AppPath + "HuongDan.Doc"); if (Memory.IsConnectionAvailable()) { frmHelp frmHelp = new frmHelp(); string helpKey = "http://forum.qlgx.net/gopy"; ShowThongTinOnline(helpKey, true); } else { MessageBox.Show("Bạn không có kết nối internet, vì thế không sử dụng được chức năng này. Bạn có thể liên hệ với tác giả qua email " + GxConstants.EMAIL + "\n Xin chân thành cảm ơn!"); } } catch (Exception) { } } else if (key == "itHuongDan") { menuItem10_Click(this, EventArgs.Empty); } else if (key == "itRaoHonPhoi") { frmRaoHonPhoiList frm = new frmRaoHonPhoiList(); ShowForm(frm); } else if (key == "itChuanHoaDuLieuGiaoDan") { chuanHoaDuLieu(ProcessOptions.AutoUpperFirstCharGiaoDan); } else if (key == "itChuanHoaDuLieuGiaDinh") { chuanHoaDuLieu(ProcessOptions.AutoUpperFirstCharGiaDinh); } else if (key == "itChuyenHoGiaoDan") { frmChuyenHoGiaoDan frm = new frmChuyenHoGiaoDan(); ShowForm(frm); } else if (key == "itChuyenHoGiaDinh") { frmChuyenHoGiaDinh frm = new frmChuyenHoGiaDinh(); ShowForm(frm); } else if (key == "itGiaoLy") { GiaoLy.frmKhoiGiaoLyList frm = new GiaoLy.frmKhoiGiaoLyList(); ShowForm(frm); } else if (key == "itThongTinOnline") { //Check message from website start if (Memory.IsConnectionAvailable()) { GxKiemTraThongBao kiemTraThongBao = new GxKiemTraThongBao(); kiemTraThongBao.OnFinished += new EventHandler(kiemTraThongBao_OnFinished1); ThreadStart threadStart = new ThreadStart(kiemTraThongBao.Execute); Thread thread = new Thread(threadStart); thread.Start(); } else { MessageBox.Show("Bạn không có kết nối internet", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } //Check message from website end } else if (key == "itLapBiTichTuDong") { frmTaoDotBiTich frm = new frmTaoDotBiTich(); frm.ShowDialog(); } else if (key == "itBieuDo") { frmBieuDo frm = new frmBieuDo(); frm.StartPosition = FormStartPosition.CenterScreen; frm.ShowDialog(); } }