void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
 }
예제 #2
0
    private void OnDestroy()
    {
        GameObject master = GameObject.Find("Master");

        if (master != null)
        {
            ComplaintManager cm = master.GetComponent <ComplaintManager>();
            if (cm != null)
            {
                cm.isShowing = false;
            }
        }
    }
        public IHttpActionResult RetrieveComplaintsByDateRangeCompany(DateTime beginDate, DateTime endDate, int idCompany)
        {
            try
            {
                var Mngr = new ComplaintManager();
                ApiResp.Data = Mngr.RetrieveComplaintsByDateRangeAndCompany(beginDate, endDate, idCompany);

                return(Ok(ApiResp));
            }
            catch (BusinessException bex)
            {
                return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message)));
            }
        }
        public IHttpActionResult Get()
        {
            try
            {
                var Mngr = new ComplaintManager();
                ApiResp.Data = Mngr.RetrieveAll();

                return(Ok(ApiResp));
            }
            catch (BusinessException bex)
            {
                return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message)));
            }
        }
        public IHttpActionResult RetrieveComplaintsByTerminal(int idTerminal)
        {
            try
            {
                var Mngr = new ComplaintManager();
                ApiResp.Data = Mngr.RetrieveComplaintsByTerminal(new Terminal {
                    IdTerminal = idTerminal
                });

                return(Ok(ApiResp));
            }
            catch (BusinessException bex)
            {
                return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message)));
            }
        }
예제 #6
0
    // Start is called before the first frame update
    void Start()
    {
        sceneAudio = GetComponent <SceneAudioManager>();

        objsToEnable.Add(GameObject.Find("Master").GetComponent <GuestSpawner>());
        objsToEnable.Add(GameObject.Find("Player").GetComponent <ControlsManager>());


        foreach (var item in objsToEnable)
        {
            item.enabled = false;
        }


        clock            = GameObject.Find("TimeDisplay").GetComponent <TextMeshProUGUI>();
        complaintManager = GameObject.Find("Master").GetComponent <ComplaintManager>();
    }
예제 #7
0
    // Start is called before the first frame update
    void Start()
    {
        soundLevel = 0f;
        annoyance  = 0f;
        ChangeVolume();

        spriteArray = new Sprite[4];

        spriteArray[0] = Resources.Load("window1") as Sprite;
        spriteArray[1] = Resources.Load("window2") as Sprite;
        spriteArray[2] = Resources.Load("window3") as Sprite;
        spriteArray[3] = Resources.Load("window4") as Sprite;


        windowRenderer = GameObject.Find("Window").GetComponent <SpriteRenderer>();
        cm             = GameObject.Find("Master").GetComponent <ComplaintManager>();
    }
        public IHttpActionResult Delete(Complaint complaint)
        {
            try
            {
                var Mngr = new ComplaintManager();
                Mngr.Delete(complaint);

                ApiResponse ApiResp = new ApiResponse
                {
                    Message = "Queja eliminada exitosamente"
                };

                return(Ok(ApiResp));
            }
            catch (BusinessException bex)
            {
                return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message)));
            }
        }
        public IHttpActionResult UpdateComplaintsSettings(double number, int idParam, string name)
        {
            try
            {
                var Mngr = new ComplaintManager();
                Mngr.UpdateComplaintsSettings(number, idParam, name);

                ApiResponse ApiResp = new ApiResponse
                {
                    Message = "Action was executed"
                };

                return(Ok(ApiResp));
            }
            catch (BusinessException bex)
            {
                return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message)));
            }
        }
예제 #10
0
        public ActionResult Get_Complaint_Pre_Login(int customer_Id)
        {
            ComplaintViewModel cViewModel = new ComplaintViewModel();

            CustomerManager cMan = new CustomerManager();

            ComplaintManager _complaintMan = new ComplaintManager();

            PaginationInfo pager = new PaginationInfo();

            pager.IsPagingRequired = false;

            try
            {
                cViewModel.Complaint.Customer_Id = customer_Id;

                cViewModel.Complaint.Customer_Name = cMan.Get_Customer_By_Id(customer_Id).Customer_Name;

                cViewModel.Complaints = _complaintMan.Get_Complaints_By_Cust_Id(customer_Id, ref pager);

                if (TempData["cViewModel"] != null)
                {
                    cViewModel = (ComplaintViewModel)TempData["cViewModel"];

                    int Customer_Id = cViewModel.Complaint.Customer_Id;

                    string Customer_Name = cViewModel.Complaint.Customer_Name;

                    cViewModel.Complaint = new ComplaintInfo();

                    cViewModel.Complaint.Customer_Id = Customer_Id;

                    cViewModel.Complaint.Customer_Name = Customer_Name;
                }
            }
            catch (Exception ex)
            {
                cViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));
            }

            return(View("PreLoginComplaint", cViewModel));
        }
예제 #11
0
 public ComplaintController()
 {
     _complaintMan = new ComplaintManager();
 }
예제 #12
0
 public ComplaintController(ComplaintManager manager)
 {
     this.manager = manager;
 }
예제 #13
0
 public ComplaintApplication()
 {
     complaintMgr = new ComplaintManager(ObjectFactory.GetInstance <IComplaintRepository>());
 }