Exemplo n.º 1
0
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         if (ValidateCallTransfer())
         {
             Business.Service.ServiceBook objServiceBook = new Business.Service.ServiceBook();
             Entity.Service.ServiceBook   serviceBook    = new Entity.Service.ServiceBook();
             serviceBook.EmployeeId_FK = EmployeeId;
             serviceBook.CallId        = Business.Common.Context.CallId;
             serviceBook.CallType      = (int)Business.Common.Context.CallType;
             serviceBook.Remarks       = txtTransferReason.Text.Trim();
             serviceBook.CreatedBy     = Convert.ToInt32(HttpContext.Current.User.Identity.Name);
             int response = objServiceBook.Service_CallTransfer_Save(serviceBook);
             if (response > 0)
             {
                 ScriptManager.RegisterStartupScript(this, this.GetType(), "alertUser", "refreshAndClose();", true);
             }
             else
             {
                 Message.IsSuccess = false;
                 Message.Text      = "Sorry! cannot tranfer call. Please refresh this page and try again..";
             }
         }
     }
     catch (Exception ex)
     {
         Message.IsSuccess = false;
         Message.Text      = ex.Message;
         ex.WriteException();
     }
     Message.Show = true;
 }