示例#1
0
        protected void imbView_Click(object sender, EventArgs e)
        {
            try
            {
                int index = int.Parse(((ImageButton)sender).CommandArgument);
                Session[searchcondition] = GetSearchCondition();

                string ticketId   = ((Label)gvResult.Rows[index].FindControl("lblTicketId")).Text.Trim();
                string campaignId = ((Label)gvResult.Rows[index].FindControl("lblCampaignId")).Text.Trim();
                string productId  = ((Label)gvResult.Rows[index].FindControl("lblProductId")).Text.Trim();

                string type = new ConfigProductScreenBiz().GetFieldType(campaignId, productId, SLMConstant.ConfigProductScreen.ActionType.View);

                Session[SLMConstant.SessionName.CampaignId] = campaignId;
                Session[SLMConstant.SessionName.ProductId]  = productId;

                Response.Redirect("SLM_SCR_004.aspx?ticketid=" + ticketId + "&type=" + type + "&backtype=1", false);
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
示例#2
0
        protected void btnAttachDocYes_Click(object sender, EventArgs e)
        {
            try
            {
                btnAttachDocYes.Enabled = false;
                btnAttachDocNo.Enabled  = false;

                string type = new ConfigProductScreenBiz().GetFieldType(lblResultTicketId.Text.Trim(), SLMConstant.ConfigProductScreen.ActionType.View);

                if (cbResultHasAdamsUrl.Checked)
                {
                    LeadDataForAdam leadData = SlmScr003Biz.GetLeadDataForAdam(lblResultTicketId.Text.Trim());
                    StaffData       staff    = SlmScr003Biz.GetStaff(HttpContext.Current.User.Identity.Name);

                    string script = AppUtil.GetCallAdamScript(leadData, HttpContext.Current.User.Identity.Name, (staff.EmpCode != null ? staff.EmpCode : ""), true, type);

                    ScriptManager.RegisterClientScriptBlock(Page, GetType(), "calladam", script, true);
                }
                else
                {
                    Response.Redirect("SLM_SCR_004.aspx?ticketid=" + lblResultTicketId.Text.Trim() + "&type=" + type);
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlertAndRedirect(Page, message, "SLM_SCR_003.aspx");
            }
        }
示例#3
0
        protected void imbView_Click(object sender, EventArgs e)
        {
            try
            {
                int index = int.Parse(((ImageButton)sender).CommandArgument);
                Session[searchcondition] = GetSearchCondition();

                string ticketId   = ((Label)gvResult.Rows[index].FindControl("lblTicketId")).Text.Trim();
                string campaignId = ((Label)gvResult.Rows[index].FindControl("lblCampaignId")).Text.Trim();
                string productId  = ((Label)gvResult.Rows[index].FindControl("lblProductId")).Text.Trim();

                string type = new ConfigProductScreenBiz().GetFieldType(campaignId, productId, SLMConstant.ConfigProductScreen.ActionType.View);

                if (Session[nextleadlist] != null)
                {
                    var          list = (List <NextLeadData>)Session[nextleadlist];
                    NextLeadData obj  = list.Where(p => p.TicketId == ticketId).FirstOrDefault();
                    list.Remove(obj);
                    Session[nextleadlist] = list;
                }

                Response.Redirect("SLM_SCR_004.aspx?ticketid=" + ticketId + "&type=" + type + "&backtype=1", false);
                //Response.Redirect("SLM_SCR_004.aspx?ticketid=" + ((ImageButton)sender).CommandArgument + "&ReturnUrl=" + Server.UrlEncode(Request.Url.AbsoluteUri));
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
示例#4
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);
            }
        }
示例#5
0
        protected void imbView_Click(object sender, EventArgs e)
        {
            string type = new ConfigProductScreenBiz().GetFieldType(((ImageButton)sender).CommandArgument, SLMConstant.ConfigProductScreen.ActionType.View);

            Response.Redirect("SLM_SCR_004.aspx?ticketid=" + ((ImageButton)sender).CommandArgument + "&type=" + type + "&backtype=" + Request["backtype"]);
        }