/// <summary> /// Fills all user records to gridview control /// </summary> private void GridBind(MoldVo conditionInVo) { Mold_dgv.DataSource = null; try { MoldVo outVo = (MoldVo)base.InvokeCbm(new GetMoldMasterMntCbm(), conditionInVo, false); Mold_dgv.AutoGenerateColumns = false; BindingSource bindingSource1 = new BindingSource(outVo.MoldListVo, null); if (bindingSource1.Count > 0) { Mold_dgv.DataSource = bindingSource1; } else { messageData = new MessageData("mmci00006", Properties.Resources.mmci00006, null); //"mold" logger.Info(messageData); popUpMessage.Information(messageData, Text); } Mold_dgv.ClearSelection(); Update_btn.Enabled = false; Delete_btn.Enabled = false; } catch (Framework.ApplicationException exception) { popUpMessage.ApplicationError(exception.GetMessageData(), Text); logger.Error(exception.GetMessageData()); } }
/// <summary> /// binds datasource /// </summary> /// <param name="outVo"></param> private void BindDataSource(List <MoldVo> outVo) { Mold_dgv.AutoGenerateColumns = false; BindingSource bindingSource1 = new BindingSource(outVo, null); if (bindingSource1 != null && bindingSource1.Count > 0) { Mold_dgv.DataSource = bindingSource1; } else { messageData = new MessageData("tpci00006", Properties.Resources.mmci00006, null); logger.Info(messageData); popUpMessage.Information(messageData, Text); } Mold_dgv.ClearSelection(); }