Пример #1
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");
            }
        }
Пример #2
0
 protected void lbDocument_Click(object sender, EventArgs e)
 {
     try
     {
         LeadDataForAdam leadData = SlmScr003Biz.GetLeadDataForAdam(((ImageButton)sender).CommandArgument);
         ScriptManager.RegisterClientScriptBlock(Page, GetType(), "calladam", AppUtil.GetCallAdamScript(leadData, HttpContext.Current.User.Identity.Name, txtEmpCode.Text.Trim(), false), true);
     }
     catch (Exception ex)
     {
         string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
         _log.Debug(message);
         AppUtil.ClientAlert(Page, message);
     }
 }
Пример #3
0
        protected void lbDocument_Click(object sender, EventArgs e)
        {
            try
            {
                LeadDataForAdam leadData = SlmScr003Biz.GetLeadDataForAdam(((ImageButton)sender).CommandArgument);
                //convert customerdetail.contactBranch, channelInfo.Branch, to newBranchCode
                leadData.ContactBranch = BranchBiz.GetBranchCodeNew(leadData.ContactBranch);
                leadData.Branch        = BranchBiz.GetBranchCodeNew(leadData.Branch);

                ScriptManager.RegisterClientScriptBlock(Page, GetType(), "calladam", AppUtil.GetCallAdamScript(leadData, HttpContext.Current.User.Identity.Name, txtEmpCode.Text.Trim(), false, ""), true);
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }