Exemplo n.º 1
0
 private void AddButton_Click(object sender, EventArgs e)
 {
     try
     {
         CustomerListForm.m_phoneNumber = String.Empty;
         CMemberShipCardAddForm tempCustomerInfoForm = new CMemberShipCardAddForm("Add", null);
         tempCustomerInfoForm.ShowDialog();
         //CFormManager.Forms.Push(this);
         //this.Hide();
     }
     catch (Exception exp)
     {
         Console.Write(exp.Message);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Modified by Baruri at 12.12.2008 for the new customer address format
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UpdateButton_Click(object sender, EventArgs e)
        {
            try
            {
                for (int rowIndex = 0; rowIndex < dgvMembershipCard.Rows.Count; rowIndex++)
                {
                    if (dgvMembershipCard.Rows[rowIndex].Selected == true && dgvMembershipCard.Rows[rowIndex].Cells["id"].Value != null)
                    {
                        long ID = Convert.ToInt64(dgvMembershipCard.Rows[rowIndex].Cells["id"].Value.ToString()); //for phone number

                        MembershipCard  membershipCard  = membershipCardDao.GetMembershipCardByID(ID);

                        //CCustomerManager tempCustomerManager = new CCustomerManager();
                        //CCustomerInfo tempCustomerInfo = new CCustomerInfo();
                        //CResult tempResult = tempCustomerManager.CustomerInfoGetByPhone(phone);

                        if (membershipCard != null )
                        {

                            CMemberShipCardAddForm tempCustomerInfoForm = new CMemberShipCardAddForm("Update", membershipCard);
                            tempCustomerInfoForm.ISModify = true;
                            tempCustomerInfoForm.MembershipCardData = membershipCard;
                            tempCustomerInfoForm.ShowDialog();
                            //CFormManager.Forms.Push(this);
                            //this.Hide();
                        }
                        break;
                    }
                }
            }
            catch (Exception exp)
            {
                Console.Write(exp.Message);
            }
        }