示例#1
0
        /// <summary>
        /// selects Customer record for updation and show Customer form
        /// </summary>
        private void BindUpdateCustomerData()
        {
            DataGridViewRow selectedCustomer = GetSelectedCustomerData();

            CustomerVo customerUpdateVo = (CustomerVo)selectedCustomer.DataBoundItem;

            AddCustomerMasterForm newAddForm = new AddCustomerMasterForm(CommonConstants.MODE_UPDATE, customerUpdateVo);

            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());
            }
        }
示例#2
0
        /// <summary>
        /// event to open the  add screen
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Add_btn_Click(object sender, EventArgs e)
        {
            AddCustomerMasterForm newAddForm = new AddCustomerMasterForm(CommonConstants.MODE_ADD);

            newAddForm.ShowDialog();

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

                GridBind(FormConditionVo());
            }
        }