private void AddUserLocationForm_Load(object sender, EventArgs e) { UserLocationCode_txt.Select(); if (vo.UserLocationId > 0) { UserLocationCode_txt.Text = vo.UserLocationCode; UserLocationName_txt.Text = vo.UserLocationName; } }
private void Clear_btn_Click(object sender, EventArgs e) { UserLocationCode_txt.Text = string.Empty; UserLocationName_txt.Text = string.Empty; UserLocationDetails_dgv.DataSource = null; UserLocationCode_txt.Select(); }
private void AddUserLocationForm_Load(object sender, EventArgs e) { UserLocationCode_txt.Select(); if (vo.UserLocationId > 0) { UserLocationCode_txt.Text = vo.UserLocationCode; UserLocationName_txt.Text = vo.UserLocationName; } LocationVo Locationvo = (LocationVo)DefaultCbmInvoker.Invoke(new GetLocationMasterMntCbm(), new LocationVo()); locationcode_cmb.DataSource = Locationvo.LocationListVo; locationcode_cmb.DisplayMember = "LocationCode"; locationcode_cmb.Text = ""; }
private bool checkdate() { if (UserLocationCode_txt.Text.Trim().Length == 0) { messageData = new MessageData("mmcc00005", Properties.Resources.mmcc00005, UserLocationCode_lbl.Text); popUpMessage.Warning(messageData, Text); UserLocationCode_txt.Focus(); return(false); } if (UserLocationName_txt.Text.Trim().Length == 0) { messageData = new MessageData("mmcc00005", Properties.Resources.mmcc00005, UserLocationName_lbl.Text); popUpMessage.Warning(messageData, Text); UserLocationName_txt.Focus(); return(false); } UserLocationCode_txt.Text = UserLocationCode_txt.Text.Trim(); UserLocationName_txt.Text = UserLocationName_txt.Text.Trim(); UserLocationVo outVo = new UserLocationVo(), inVo = new UserLocationVo { UserLocationId = vo.UserLocationId, UserLocationCode = UserLocationCode_txt.Text }; try { outVo = (UserLocationVo)DefaultCbmInvoker.Invoke(new CheckUserLocationCbm(), inVo); if (outVo.AffectedCount > 0) { messageData = new MessageData("mmcc00006", Properties.Resources.mmcc00006, UserLocationCode_lbl.Text); popUpMessage.Warning(messageData, Text); UserLocationCode_txt.Focus(); return(false); } } catch (Com.Nidec.Mes.Framework.ApplicationException exception) { popUpMessage.ApplicationError(exception.GetMessageData(), Text); logger.Error(exception.GetMessageData()); return(false); } return(true); }