Exemplo n.º 1
0
        /// <summary>
        /// selects item record for updation and show item form
        /// </summary>
        private void BindUpdateUserData()
        {
            int selectedrowindex = ItemData_dgv.SelectedCells[0].RowIndex;

            ItemVo selectedData = (ItemVo)ItemData_dgv.Rows[selectedrowindex].DataBoundItem;

            AddItemForm newAddForm = new AddItemForm();

            newAddForm.CreateForm(CommonConstants.MODE_UPDATE, selectedData);

            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());
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// event to open the  add screen
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected virtual void Add_btn_Click(object sender, EventArgs e)
        {
            AddItemForm newAddForm = new AddItemForm();

            newAddForm.CreateForm(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());
            }
        }