コード例 #1
0
        public ActionResult SenMailToParentsAndTeachers(string YakkrID)
        {
            bool Result = false;

            try
            {
                new ParentData().UpdateStatusChange("0", Session["UserID"].ToString(), "73", "", YakkrID);
                Dictionary <String, String> dictEmail = new Dictionary <string, string>();
                if (Session["UserID"] != null)
                {
                    dictEmail = new YakkrData().SenMailToParentsAndTeachers(new Guid(Session["UserID"].ToString()));
                }
                if (dictEmail.Count() > 0)
                {
                    foreach (KeyValuePair <string, string> pair in dictEmail)
                    {
                        SendMail.SendEmailToParentAndTeacher(pair.Value.ToString(), "Classroom closed approval mail", Session["EmailID"].ToString());
                    }
                }
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
            }
            return(Json(Result));
        }
コード例 #2
0
        public ActionResult YakkrList(string YakkrCode)
        {
            List <YakkrClientDetail> listYakkr = new List <FingerprintsModel.YakkrClientDetail>();

            try
            {
                string yakkrDescription;

                ViewBag.YakkrCode = YakkrCode;

                string Status = "1";

                listYakkr = new YakkrData().GetYakkrListByCode(out yakkrDescription, YakkrCode.ToString(), Status);
                ViewBag.YakkrDescription = yakkrDescription;
                if (listYakkr.Count() == 0)
                {
                    return(RedirectToAction("YakkrDetails"));
                }
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
            }
            return(View(listYakkr));
        }
コード例 #3
0
        public PartialViewResult ReferralIssueSummary(int yakkrid, string clientname)
        {
            var result = new YakkrData().GetQuestionaireByYakkrId(yakkrid, 5);

            ViewBag.CName    = clientname;
            ViewBag.Yakkr453 = yakkrid;

            return(PartialView("~/Views/Partialviews/_ReferralIssueSummaryPartial.cshtml", result));
        }
コード例 #4
0
 public JsonResult GetCaseNoteDetailsByYakkr(string clientId, string yakkrId)
 {
     RosterNew.CaseNote caseNote = new RosterNew.CaseNote();
     try
     {
         caseNote = new YakkrData().GetCaseNoteByYakkr(clientId, yakkrId);
     }
     catch (Exception ex)
     {
         clsError.WriteException(ex);
     }
     return(Json(caseNote, JsonRequestBehavior.AllowGet));
 }
コード例 #5
0
        public JsonResult UpdateStatusChange(string HouseHoldId, string RouteCode, string ClientId)
        {
            YakkrData obj = new YakkrData();

            try
            {
                return(Json(new ParentData().UpdateStatusChange(HouseHoldId, Session["UserID"].ToString(), RouteCode, ClientId, null)));
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
                return(Json("Error occured please try again."));
            }
        }
コード例 #6
0
        public JsonResult UpdateAddressChange(string HouseHoldId, string YakkrId)
        {
            YakkrData obj = new YakkrData();

            try
            {
                return(Json(new ParentData().UpdateAddressChange(HouseHoldId, Session["UserID"].ToString(), YakkrId)));
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
                return(Json("Error occured please try again."));
            }
        }
コード例 #7
0
        public JsonResult ClassroomOpenrequestApproval(string RouteCode, string Notes, string YakkrID)
        {
            YakkrData obj = new YakkrData();

            try
            {
                return(Json(new ParentData().ClassroomOpenrequestApproval(Session["UserID"].ToString(), RouteCode, Notes, YakkrID)));
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
                return(Json("Error occured please try again."));
            }
        }
コード例 #8
0
        public JsonResult GetParentStatus(string HouseHoldId)
        {
            YakkrData obj = new YakkrData();

            try
            {
                return(Json(new ParentData().GetParentStatus(Session["HouseHoldId"].ToString(), Session["EmailID"].ToString())));
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
                return(Json("Error occured please try again."));
            }
        }
コード例 #9
0
        public JsonResult Deleteyakkr(string YakkrRoleID = "0")
        {
            YakkrData obj = new YakkrData();

            try
            {
                return(Json(obj.Deleteyakkrinfo(YakkrRoleID)));
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
                return(Json("Error occured please try again."));
            }
        }
コード例 #10
0
        public JsonResult GetYakkrDetailslist(string YakkrId = "0")
        {
            YakkrData obj = new YakkrData();

            try
            {
                return(Json(obj.Getyakkrdetailinfo(YakkrId, Session["AgencyID"].ToString())));
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
                return(Json("Error occured please try again."));
            }
        }
コード例 #11
0
        public JsonResult DeleteYakkrByYakkrId(long clientId, long yakkrId)
        {
            bool isResult = false;

            try
            {
                isResult = new YakkrData().DeleteYakkrRoutingById(clientId, yakkrId);
            }
            catch (Exception ex)
            {
                clsError.WriteException(ex);
            }
            return(Json(isResult, JsonRequestBehavior.AllowGet));
        }
コード例 #12
0
        public JsonResult GetAddressByHouseHoldId(string YakkrID, string HouseHoldId)
        {
            YakkrData obj = new YakkrData();

            try
            {
                return(Json(new ParentData().GetAddressByHouseHold(YakkrID, HouseHoldId)));
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
                return(Json("Error occured please try again."));
            }
        }
コード例 #13
0
        public JsonResult ApproveEducationRequest(String YakkrId)
        {
            YakkrData obj = new YakkrData();

            try
            {
                return(Json(new ParentData().ApproveEducationRequest(YakkrId)));
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
                return(Json("Error occured please try again."));
            }
        }
コード例 #14
0
        public JsonResult GetAlert(string HouseHoldId, string RouteCode, string Date)
        {
            YakkrData obj = new YakkrData();

            try
            {
                string UserId = Session["UserID"].ToString();
                return(Json(new ParentData().GetStatus(HouseHoldId, RouteCode, Date, "", UserId)));
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
                return(Json("Error occured please try again."));
            }
        }
コード例 #15
0
        public JsonResult GetVolunteerRequest(string HouseHoldId, string ClientId, string YakkrId)
        {
            YakkrData obj = new YakkrData();

            try
            {
                string UserId = Session["UserID"].ToString();
                return(Json(new ParentData().GetVolunteerRequest(HouseHoldId, ClientId, YakkrId)));
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
                return(Json("Error occured please try again."));
            }
        }
コード例 #16
0
        public JsonResult GetParentMessages(string YakkrId)
        {
            YakkrData obj = new YakkrData();

            try
            {
                string UserId = Session["UserID"].ToString();
                return(Json(new ParentData().GetParentMessages(YakkrId)));
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
                return(Json("Error occured please try again."));
            }
        }
コード例 #17
0
        public ActionResult Yakkr(Yakkr info, FormCollection collection)
        {
            try
            {
                TempData.Keep();
                string    message = "";
                YakkrData obj     = new YakkrData();
                if (info.YakkrRoleID == 0)
                {
                    info.YakkrID     = collection["DdlYakkrList"].ToString() == "0" ? null : collection["DdlYakkrList"].ToString();
                    info.StaffRoleID = collection["DdlStaffList"].ToString() == "0" ? null : collection["DdlStaffList"].ToString();

                    info.SecondaryRoleID = collection["DdlStaffSecondaryList"] == null ? null : collection["DdlStaffSecondaryList"].ToString();
                    message        = obj.AddYakkrInfo(info, 0, Guid.Parse(Session["UserID"].ToString()), Session["AgencyID"].ToString());
                    ViewBag.result = "Sucess";
                }
                else
                {
                    info.YakkrID     = collection["DdlYakkrList"].ToString() == "0" ? null : collection["DdlYakkrList"].ToString();
                    info.StaffRoleID = collection["DdlStaffList"].ToString() == "0" ? null : collection["DdlStaffList"].ToString();

                    info.SecondaryRoleID = collection["DdlStaffSecondaryList"] == null ? null : collection["DdlStaffSecondaryList"].ToString();
                    message        = obj.AddYakkrInfo(info, 1, Guid.Parse(Session["UserID"].ToString()), Session["AgencyID"].ToString());
                    ViewBag.result = "Sucess";
                }
                if (message == "1")
                {
                    // TempData["message"] = "Record added successfully.";
                    ViewBag.message = "Record added successfully.";
                }
                else if (message == "2")
                {
                    ViewBag.message = "Record updated successfully.";
                }
                else if (message == "3")
                {
                    ViewBag.message = "Record already exist.";
                }
            }
            catch (Exception ex)
            {
                clsError.WriteException(ex);
            }
            info.YakkrList         = (List <Yakkr.YakkrCode>)TempData["YakkrList"];
            info._YakkrRolesList   = (List <Yakkr.YakkrRoles>)TempData["_YakkrRolesList"];
            info._YakkrAgencyCodes = (List <Yakkr.YakkrAgencyCodes>)TempData["_YakkrAgencyCodes"];
            return(View(info));
        }
コード例 #18
0
        public ActionResult ClearYakkrOfReferralIssueSummary(int yakkrid)
        {
            var result = false;

            try
            {
                result = new YakkrData().ClearYakkrOfReferralIssueSummary(yakkrid);
            }
            catch (Exception ex)
            {
                clsError.WriteException(ex);
            }

            // return new RedirectResult("~/Yakkr/YakkrList?YakkrCode=453");
            return(Json(result, JsonRequestBehavior.AllowGet));
        }
コード例 #19
0
        public JsonResult GetYakkrCountByUser()
        {
            int yakkrCount = 0;

            try
            {
                StaffDetails staff = StaffDetails.GetInstance();
                yakkrCount = new YakkrData().GetYakkrCountByUserId((Guid)staff.AgencyId, (Guid)staff.UserId, Status: "1");
            }
            catch (Exception ex)
            {
                clsError.WriteException(ex);
            }

            return(Json(yakkrCount, JsonRequestBehavior.AllowGet));
        }
コード例 #20
0
        public ActionResult YakkrDetails()
        {
            List <YakkrDetail> listYakkr = new List <FingerprintsModel.YakkrDetail>();

            try
            {
                string Status = "1";

                listYakkr = new YakkrData().GetYakkrDetail(new Guid(Session["AgencyID"].ToString()), new Guid(Session["UserID"].ToString()), Status);
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
            }
            return(View(listYakkr));
        }
コード例 #21
0
 public JsonResult YakkrDetails(string sortOrder, string sortDirection, string search, int pageSize, int requestedPage = 1)
 {
     try
     {
         YakkrData info = new YakkrData();
         string    totalrecord;
         int       skip = pageSize * (requestedPage - 1);
         var       list = info.YakkrInfoDetails(out totalrecord, sortOrder, sortDirection, search.TrimEnd().TrimStart(), skip, pageSize, Session["AgencyID"].ToString());
         return(Json(new { list, totalrecord }));
     }
     catch (Exception Ex)
     {
         clsError.WriteException(Ex);
         return(Json(Ex.Message));
     }
     // return View();
 }
コード例 #22
0
        public JsonResult GetCaseNoteDetailsByYakkr(string householdid, string clientId, string yakkrId)
        {
            //  InternalRefferalCaseNote caseNote = new InternalRefferalCaseNote();
            CaseNoteByClientID casnote = Fingerprints.Common.FactoryInstance.Instance.CreateInstance <CaseNoteByClientID>();

            try
            {
                var caesNoteID = new YakkrData().GetCaseNoteByYakkr(yakkrId);

                casnote.CaseNote             = new CaseNote();
                casnote.CaseNote.ClientId    = clientId;
                casnote.CaseNote.CaseNoteid  = Convert.ToString(caesNoteID);
                casnote.CaseNote.HouseHoldId = householdid;

                casnote = new RosterData(staff).GetCaseNoteByCaseNoteId(casnote);
            }
            catch (Exception ex)
            {
                clsError.WriteException(ex);
            }
            return(Json(casnote, JsonRequestBehavior.AllowGet));
        }
コード例 #23
0
        public ActionResult YakkrList(string YakkrCode)
        {
            List <YakkrClientDetail> listYakkr = new List <FingerprintsModel.YakkrClientDetail>();

            try
            {
                ViewBag.YakkrCode = YakkrCode;
                string Status = "1";

                listYakkr = new YakkrData().GetYakkrListByCode(new Guid(Session["AgencyID"].ToString()), new Guid(Session["UserID"].ToString()), YakkrCode.ToString(), Status);

                if (listYakkr.Count() == 0)
                {
                    return(RedirectToAction("YakkrDetails"));
                }
            }
            catch (Exception Ex)
            {
                clsError.WriteException(Ex);
            }
            return(View(listYakkr));
        }
コード例 #24
0
        public ActionResult Organizationalissue(int id, string clientid, string center, string household, string clientname)
        {
            var result = new YakkrData().GetQuestionaireByYakkrId(id, 3);



            ViewBag.ClientName = clientname;
            ViewBag.ClientId   = Convert.ToInt32(EncryptDecrypt.Decrypt64(clientid));


            //CaseNoteByClientID caseNotebyClientId = Fingerprints.Common.FactoryInstance.Instance.CreateInstance<CaseNoteByClientID>();
            //string Name = "";
            //caseNotebyClientId.Enc_ClientID = clientid;
            //caseNotebyClientId.Enc_HouseholdID = household;
            //caseNotebyClientId.CenterID = center;
            //RosterNew.Users Userlist = new RosterNew.Users();
            //var Rd = new RosterData();
            //var stf = StaffDetails.GetInstance();
            //Rd.GetCaseNote(ref Name, caseNotebyClientId, stf);
            //ViewBag.Userlist = Userlist.UserList;

            return(View(result));
        }
コード例 #25
0
        public JsonResult GetYakkr451DetailsById(int id)
        {
            var result = new YakkrData().GetQuestionaireByYakkrId(id, 3);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
コード例 #26
0
        //[ValidateInput(false)]
        public ActionResult InsertQuestionnaireForm(Questionaire qsform, RosterNew.CaseNote CaseNote)
        {
            bool caseNoteResult      = true;
            bool questionnaireResult = false;

            if (qsform.AppointmentMaked == 0)
            {
                string message = "";
                string Name    = "";

                //insert casenote

                CaseNote.CaseNoteAttachmentList.ForEach(x =>
                {
                    x.AttachmentFileName = string.IsNullOrEmpty(x.AttachmentFileName) ? "CaseNoteAttachment" : x.AttachmentFileName;

                    if (!string.IsNullOrEmpty(x.AttachmentJson))
                    {
                        x.AttachmentFileByte = Convert.FromBase64String(x.AttachmentJson);
                    }
                });

                message = new RosterData(staff).SaveCaseNotes(ref Name, CaseNote, 2);

                if (message != "1")
                {
                    caseNoteResult = false;
                }


                if (!string.IsNullOrEmpty(Name))
                {
                    qsform.CaseNoteId = Convert.ToInt32(Name);
                }
            }

            if (caseNoteResult)
            {
                questionnaireResult = new YakkrData().InsertQuestionaireForm(qsform, staff);

                if (!questionnaireResult)
                {
                    new RosterData(staff).DeleteCaseNote(casenoteid: Convert.ToInt32(CaseNote.CaseNoteid), appendcid: new int[] { }, deletemain: true, mode: 1);
                }
            }



            ////return View();
            //if (qsform.AppointmentMaked == 0 && qsform.ReceiveAnotherReferral)
            //{

            //    string ID = EncryptDecrypt.Encrypt64(CaseNote.ClientId);
            //    return new RedirectResult("~/Roster/ReferralService?id=" + ID + "&ClientName=" + CaseNote.ClientName + "");
            //}
            //else
            //{
            //    return new RedirectResult("~/Yakkr/YakkrList?YakkrCode=450");
            //}


            return(Json(new { result = questionnaireResult, encClientId = EncryptDecrypt.Encrypt64(CaseNote.ClientId) }, JsonRequestBehavior.AllowGet));
        }
コード例 #27
0
        // [ValidateInput(false)]
        //public ActionResult InsertOrganizationalissue(int ProblemOn, int? CRColorCode, int QuestionaireID, int CommunityId, int Yakkrid,
        //   string MgNotes, RosterNew.CaseNote CaseNote, List<RosterNew.Attachment> Attachments, RosterNew.ClientUsers TeamIds)
        public ActionResult InsertOrganizationalIssue(ReferalDetails referralDetails, RosterNew.CaseNote caseNote, int yakkrId)
        {
            bool caseNoteResult      = true;
            bool questionnaireResult = false;
            int  caseNoteId          = 0;

            if (referralDetails.ProblemOn == 1)
            {
                string message = "";
                string Name    = "";

                //insert casenote


                if (caseNote != null)
                {
                    if (caseNote.CaseNoteAttachmentList != null)
                    {
                        caseNote.CaseNoteAttachmentList.ForEach(x =>
                        {
                            x.AttachmentFileName = string.IsNullOrEmpty(x.AttachmentFileName) ? "OrganizationalIssue_CaseNoteAttachment" : x.AttachmentFileName;

                            if (!string.IsNullOrEmpty(x.AttachmentJson))
                            {
                                x.AttachmentFileByte = Convert.FromBase64String(x.AttachmentJson);
                            }
                        });
                    }


                    message = new RosterData(staff).SaveCaseNotes(ref Name, caseNote, 2);
                }


                if (message != "1")
                {
                    caseNoteResult = false;
                }


                if (!string.IsNullOrEmpty(Name))
                {
                    caseNoteId = Convert.ToInt32(Name);
                }
            }



            if (caseNoteResult)
            {
                questionnaireResult = new YakkrData().SubmitFeedBack453(4, referralDetails, staff, yakkrId, caseNoteId);

                if (!questionnaireResult)
                {
                    new RosterData(staff).DeleteCaseNote(casenoteid: caseNoteId, appendcid: new int[] { }, deletemain: true, mode: 1);
                }
            }

            //if (ProblemOn == 1)
            //{
            //    StringBuilder _Ids = new StringBuilder();
            //    if (TeamIds.IDS != null)
            //    {
            //        foreach (string str in TeamIds.IDS)
            //        {
            //            _Ids.Append(str + ",");
            //        }
            //        CaseNote.StaffIds = _Ids.ToString().Substring(0, _Ids.Length - 1);
            //    }
            //    CaseNote.CaseNotetags = (CaseNote != null && !string.IsNullOrEmpty(CaseNote.CaseNotetags)) ? CaseNote.CaseNotetags.Substring(0, CaseNote.CaseNotetags.Length - 1) : "";
            //}
            //CaseNote.CaseNoteAttachmentList = Attachments;
            //var result = new YakkrData().SubmitFeedBack453(4, ProblemOn, CRColorCode, CommunityId, QuestionaireID, Yakkrid, MgNotes, CaseNote);


            return(Json(new { result = questionnaireResult }, JsonRequestBehavior.AllowGet));
        }