private void newToolStripMenuItem_Click(object sender, EventArgs e) { // try //{ // if (!IsList) // { // if (objUIRights.AddRight) // { VehInOut objVehInOut; frmVehInOutProp objFrmProp; objVehInOut = new VehInOut(); objFrmProp = new frmVehInOutProp(objVehInOut, objCurUser); objFrmProp.IsNew = true; objFrmProp.EntryType = this.EntryType; objFrmProp.MdiParent = this.MdiParent; objFrmProp.Entry_DataChanged += new frmVehInOutProp.VehInOutUpdateHandler(Entry_DataChanged); objFrmProp.Show(); // } // else // { // throw new Exception("Not Authorised."); // } // } //} //catch (Exception ex) //{ // MessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); //} }
private void modifyToolStripMenuItem_Click(object sender, EventArgs e) { try { if (lvwVehInOut.SelectedItems != null && lvwVehInOut.SelectedItems.Count != 0) { if (IsList) { btnOk_Click(sender, e); } else { //if (objUIRights.ModifyRight) //{ VehInOut objVehInOut; frmVehInOutProp objFrmProp; objVehInOut = VehInOutManager.GetItem(Convert.ToInt32(lvwVehInOut.SelectedItems[0].Name)); objFrmProp = new frmVehInOutProp(objVehInOut, objCurUser); objFrmProp.MdiParent = this.MdiParent; objFrmProp.Entry_DataChanged += new frmVehInOutProp.VehInOutUpdateHandler(Entry_DataChanged); objFrmProp.Show(); //} //else //{ // throw new Exception("Not Authorised."); //} } } } catch (Exception ex) { MessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }