private void grvLenhDieuHanh_Click(object sender, EventArgs e) { try { TaxiOperationCommand objCommand = (TaxiOperationCommand)grvLenhDieuHanh.GetFocusedRow(); txtOrderCode.Text = objCommand.OrderCode.ToString(); _idCmd = objCommand.Id; lueBoPhan.EditValue = objCommand.FunctionUsing; txtLenh.Text = objCommand.Command; luePhimTat.EditValue = objCommand.Shortcuts; lueTrangThaiCG.EditValue = objCommand.CallStatus; //if (_phimTat != "") //{ // luePhimTat.EditValue = int.Parse(_phimTat); //} lueTrangThaiLenh.EditValue = objCommand.Status; lueKieuCuocGoi.EditValue = objCommand.CallType; if (objCommand.ParentCommand != null && !objCommand.ParentCommand.Equals("")) { chkParentCommand.EditValue = objCommand.ParentCommand; } else { chkParentCommand.EditValue = null; } lookupEdit_EnumCommand_SendDriver1.EditValue = objCommand.SendDriver; ceMauNen.Text = objCommand.CmdColor ?? ""; ceMauNenThayDoi.Text = objCommand.ParentColor ?? ""; _isXeNhan = objCommand.RequireVehicle; if (_isXeNhan) { ckbCoXeNhan.Checked = true; } else { ckbCoXeNhan.Checked = false; } _isChuyenMoiKhach = objCommand.IsSend_CallCust != null && (bool)objCommand.IsSend_CallCust; if (_isChuyenMoiKhach) { ckbChuyenMoiKhach.Checked = true; } else { ckbChuyenMoiKhach.Checked = false; } lookUpEdit_CommandCode.EditValue = (int)objCommand.CommandCode; _isUpdate = true; _phimTat = objCommand.Shortcuts; _TenLenh = objCommand.Command; } catch { MessageBox.Show("Lỗi truyền dữ liệu", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public frmConfigCommand() { InitializeComponent(); _cmdTaxi = new TaxiOperationCommand(); ceMauNen.Properties.ShowCustomColors = false; ceMauNen.Properties.ShowSystemColors = false; ceMauNenThayDoi.Properties.ShowCustomColors = false; ceMauNenThayDoi.Properties.ShowSystemColors = false; grvLenhDieuHanh.Add <RepositoryItemLookUpEdit_BoPhan>("FunctionUsing"); grvLenhDieuHanh.Add <RepositoryItemLookUpEdit_PhimTat>("Shortcuts"); grvLenhDieuHanh.Add <RepositoryItemLookUpEdit_TrangThaiCG>("CallStatus"); grvLenhDieuHanh.Add <RepositoryItemLookUpEdit_TrangThaiLenh>("Status"); grvLenhDieuHanh.Add <RepositoryItemLookUpEdit_KieuCuocGoi>("CallType"); grvLenhDieuHanh.Add <RepositoryItemLookUpEdit_SendDriver>("SendDriver"); grvLenhDieuHanh.Add <RepositoryItemLookUpEdit_Enum_CommandCode>("CommandCode"); }