Ejemplo n.º 1
0
 /// <summary>
 /// Constructor to initialize save type and the campaign data object to edit
 /// </summary>
 public AddCampaign(SaveType eSaveType, ObjectCampaign.CampaignInstance objCampaign)
 {
     InitializeComponent();
     m_objCampaign = objCampaign;
     m_eSaveType = eSaveType;
     this.InitializeModule();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Logic to save campaign record
        /// </summary>
        private void SaveCampaign(bool IsNew)
        {
            if (!this.ValidateEntries())
                return;

            ObjectCampaign.CampaignInstance objParams = new ObjectCampaign.CampaignInstance();
            objParams.id = CampaignId;
            objParams.campaign_name = txtName.Text;
            objParams.customer_id = CustomerId;
            objParams.description = txtDescription.Text;
            objParams.status = cboStatus.Text;
            objParams.priority = Convert.ToByte(cboPriority.Text);
            objParams.owner_user_id = (int) cboOwner.EditValue;
            objParams.web_access_user_id = (int)cboWebAccess.EditValue;
            ObjectCampaign.SaveCampaign(IsNew, objParams);
            m_objParentControl.PopulateCampaignView(CustomerId);

            MessageBox.Show("Successfully updated!", m_MessageBoxCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
            this.ParentForm.Close();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Sets the focused view instance of the grid. Instantiates the objects that can be used for data manipulation.
        /// Where gcCustomer, is the current selected object in the grid view
        /// </summary>
        private void SetFocusedViewInstance()
        {
            m_objGridView = null;
            m_objCustomer = null;
            m_objCampaign = null;

            m_objGridView = (DevExpress.XtraGrid.Views.Grid.GridView) gcCustomer.FocusedView;
            m_objCustomer = (ObjectCustomer.CustomerInstance) m_objGridView.GetFocusedRow();

            m_objGridView = (DevExpress.XtraGrid.Views.Grid.GridView) gcCustomerCampaign.FocusedView;
            m_objCampaign = (ObjectCampaign.CampaignInstance) m_objGridView.GetFocusedRow();
        }