private void LoadComboBox() { //personDriver.ShowPersonImage = true; cmbBus.DataSource = BusManagment.Bus.JBuses.GetDataTable(0); cmbBus.DisplayMember = "BUSNumber"; cmbBus.ValueMember = "Code"; cmbLine.DataSource = BusManagment.Line.JLines.GetDataTable(0); cmbLine.DisplayMember = "LineNumber"; cmbLine.ValueMember = "Code"; cmbShift.DataSource = JShifts.GetDataTable(0); cmbShift.DisplayMember = "Title"; cmbShift.ValueMember = "Code"; }
public bool Update() { //if (!JPermission.CheckPermission("BusManagment.WorkOrder.JShift.Update")) // return false; JShiftTable AT = new JShiftTable(); AT.SetValueProperty(this); if (AT.Update()) { Nodes.Refreshdata(Nodes.CurrentNode, JShifts.GetDataTable(Code).Rows[0]); return(true); } else { return(false); } }
public int Insert(bool isWebProject) { //if (!JPermission.CheckPermission("BusManagment.WorkOrder.JShift.Insert")) // return 0; JShiftTable AT = new JShiftTable(); AT.SetValueProperty(this); Code = AT.Insert(); if (Code > 0) { if (!isWebProject) { Nodes.DataTable.Merge(JShifts.GetDataTable(Code)); } } return(Code); }