Exemple #1
0
        private bool ValidateCallTransfer()
        {
            bool retValue = false;

            Business.Service.ServiceBook objServiceBook = new Business.Service.ServiceBook();
            DataSet dsServiceMaster = objServiceBook.Service_ServiceBookMaster_GetByCallId(Business.Common.Context.CallId, Business.Common.Context.CallType);

            if (dsServiceMaster != null && dsServiceMaster.Tables.Count > 0 && dsServiceMaster.Tables[0].AsEnumerable().Any())
            {
                DataTable dtServiceCallAttendance = objServiceBook.Service_ServiceCallAttendanceByServiceBookId(Convert.ToInt64(dsServiceMaster.Tables[0].Rows[0]["ServiceBookId"].ToString()));
                if (dtServiceCallAttendance != null)
                {
                    if (dtServiceCallAttendance.Select("OutTime is NULL").Any())
                    {
                        Message.IsSuccess = false;
                        Message.Text      = "Call Transfer is not allowed while Call Checked In.";
                        retValue          = false;
                    }
                    else
                    {
                        retValue = true;
                    }
                }
            }
            else
            {
                retValue = true;
            }
            return(retValue);
        }