Exemplo n.º 1
0
        protected void btnNext_Click(object sender, EventArgs e)
        {
            try
            {
                if (!ctlCommon.ValidateData())
                {
                    AppUtil.ClientAlert(this, "ข้อมูลไม่ครบถ้วน");
                    return;
                }
                if (ctlCommon.CampaignID != "")
                {
                    CampaignId = ctlCommon.CampaignID;
                    LoadDetailControl();
                    ctlLead.SetControlMode(Lead_Detail_Master.CtlMode.New);
                    tbNext.Visible = false;
                    tbSave.Visible = true;
                    ctlCommon.SetEnableCampaign(false);

                    // copy lead
                    //if (Session["ticket_id"] != null)
                    if (hdfCopyTicket.Value.Trim() != "")
                    {
                        //var ticketId = Session["ticket_id"] as string;
                        var    lead = SlmScr010Biz.GetLeadData(hdfCopyTicket.Value);
                        string type = new ConfigProductScreenBiz().GetFieldType(lead.CampaignId, lead.ProductId, SLMConstant.ConfigProductScreen.ActionType.View);

                        // remove unsed data

                        // load data from old lead
                        ctlLead.LoadData(lead, true, type);
                    }
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
Exemplo n.º 2
0
        public void GetLeadData(LeadData lead)
        {
            try
            {
                pnlLead.Visible = true;

                CampaignId = lead.CampaignId;
                ctlCommon.SetLeadData(lead);
                LoadDetailControl();
                ctlLead.LoadData(lead);
            }
            catch (Exception ex)
            {
                _log.Error(ex.InnerException != null ? ex.InnerException.Message : ex.Message);
            }
            finally
            {
                ctlCommon.SetControlMode(Lead_Detail_Master.CtlMode.View);
                ctlLead.SetControlMode(Lead_Detail_Master.CtlMode.View);
                SetAllView();
            }
        }