/// <summary> /// ManufacturingClose_Load /// </summary> /// <author>Trada</author> /// <date>Thursday, June 9 2005</date> /// <param name="sender"></param> /// <param name="e"></param> private void ManufacturingClose_Load(object sender, System.EventArgs e) { const string METHOD_NAME = THIS + ".ManufacturingClose_Load()"; try { //Set authorization for user Security objSecurity = new Security(); this.Name = THIS; if (objSecurity.SetRightForUserOnForm(this, SystemProperty.UserName) == 0) { this.Close(); // You don't have the right to view this item PCSMessageBox.Show(ErrorCode.MESSAGE_YOU_HAVE_NO_RIGHT_TO_VIEW); return; } //StoreGrid(); dtbGridLayOut = FormControlComponents.StoreGridLayout(gridWOClose); InitVariable(); //Fill Default Master Location FormControlComponents.SetDefaultMasterLocation(txtMasLoc); voMasLoc.MasterLocationID = SystemProperty.MasterLocationID; //Set focus to dtmPostDate dtmPostDate.Focus(); } catch (PCSException ex) { // Displays the error message if throwed from PCSException. PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error); try { // Log error message into log file. Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR); } catch { // Show message if logger has an error. PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error); } } catch (Exception ex) { // Displays the error message if throwed from system. PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error); try { // Log error message into log file. Logger.LogMessage(ex, METHOD_NAME, Level.ERROR); } catch { // Show message if logger has an error. PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error); } } }