Beispiel #1
0
        /// <summary>
        /// copy from grid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Copy_btn_Click(object sender, EventArgs e)
        {
            int selectedrowindex = InspectionSpecificationDetails_dgv.SelectedCells[0].RowIndex;

            InspectionSpecificationVo inspProcessVo = (InspectionSpecificationVo)InspectionSpecificationDetails_dgv.Rows[selectedrowindex].DataBoundItem;

            AddInspectionSpecificationForm newAddForm = new AddInspectionSpecificationForm(CommonConstants.MODE_SELECT, inspProcessVo);

            newAddForm.ShowDialog(this);

            if (newAddForm.IntSuccess > 0)
            {
                messageData = new MessageData("mmci00002", Properties.Resources.mmci00002, null);
                logger.Info(messageData);
                popUpMessage.Information(messageData, Text);

                GridBind(FormConditionVo());
            }
            else if (newAddForm.IntSuccess == 0)
            {
                messageData = new MessageData("mmci00007", Properties.Resources.mmci00007, null);
                logger.Info(messageData);
                popUpMessage.Information(messageData, Text);
                GridBind(FormConditionVo());
            }
        }
Beispiel #2
0
        /// <summary>
        /// insert  the record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Add_btn_Click(object sender, EventArgs e)
        {
            AddInspectionSpecificationForm newAddForm = new AddInspectionSpecificationForm(CommonConstants.MODE_ADD, null);

            newAddForm.ShowDialog();

            if (newAddForm.IntSuccess > 0)
            {
                messageData = new MessageData("mmci00001", Properties.Resources.mmci00001, null);
                logger.Info(messageData);
                popUpMessage.Information(messageData, Text);

                GridBind(FormConditionVo());
            }
        }