public ActionResult RegisterDetail() { var _RegisterInfo = new RegisterInfo(); string _casecode = ""; if (RouteData.Values["id"] != null) { _casecode = RouteData.Values["id"].ToString(); } try { var userBL = new UserBL(); _RegisterInfo = userBL.RegisterGetByCaseCode(_casecode); // lấy dữ liệu lịch sử giao dịch B_Todos_BL _B_Todos_BL = new B_Todos_BL(); List <B_Remind_Info> _ListRemind = new List <B_Remind_Info>(); List <B_Todos_Info> _Listtodo = _B_Todos_BL.NotifiGetByCasecode(_casecode, ref _ListRemind); ViewBag.ListTodo = _Listtodo; ViewBag.ListRemind = _ListRemind; return(PartialView("~/Areas/ModuleUsersAndRoles/Views/User/ViewRegisterInfo.cshtml", _RegisterInfo)); } catch (Exception ex) { Logger.LogException(ex); } return(null); }
public ActionResult FindReminds(string keysSearch, string _sortype, int _reconpage, int p_CurrentPage) { decimal _total_record = 0; string p_to = ""; string p_from = CommonFuc.Get_From_To_Page(p_CurrentPage, ref p_to, _reconpage); _sortype = " ORDER BY " + _sortype; if (string.IsNullOrEmpty(_sortype) || _sortype.Trim() == "ORDER BY") { _sortype = "ALL"; } string htmlPaging = ""; try { string language = WebApps.CommonFunction.AppsCommon.GetCurrentLang(); B_Todos_BL _obj_bl = new B_Todos_BL(); keysSearch = SessionData.CurrentUser.Username; List <B_Remind_Info> _lst = _obj_bl.B_Remind_Search(keysSearch, ref _total_record, p_from, p_to, _sortype); htmlPaging = WebApps.CommonFunction.AppsCommon.Get_HtmlPaging <B_Remind_Info>((int)_total_record, p_CurrentPage, language.Contains("VN") ? "nội dung" : "content", _reconpage, "RemindjsPaging"); ViewBag.Paging = htmlPaging; ViewBag.Obj = _lst; ViewBag.SumRecord = _total_record; var RemindData = AppsCommon.RenderRazorViewToString(this.ControllerContext, "~/Areas/Home/Views/Shared/_RemindData.cshtml"); return(Json(new { RemindData, Total = _total_record })); } catch (Exception ex) { Logger.LogException(ex); } return(null); }
public ActionResult KnHome() { if (SessionData.CurrentUser == null) { return(this.Redirect("/")); } var userBL = new UserBL(SessionData.CurrentUser); string language = AppsCommon.GetCurrentLang(); string sessionLanguage = SessionData.CurrentUser.Language; if (language != sessionLanguage) { SessionData.CurrentUser.Language = language; SessionData.CurrentUser.HtmlMenu = userBL.GetUserHtmlMenu(language); } ViewBag.LanguageCode = language; B_Todos_BL _obj_bl = new B_Todos_BL(); B_TodoNotify_Info p_todonotify = new B_TodoNotify_Info(); p_todonotify = _obj_bl.GET_NOTIFY(SessionData.CurrentUser.Username); ViewBag.NotifyInfo = p_todonotify; return(View("~/Areas/Home/Views/Home/LegalHome.cshtml")); }
public ActionResult approve() { if (SessionData.CurrentUser == null) { return(Redirect("/account/dang-xuat")); } var _WikiDoc_BL = new WikiDoc_BL(); WikiDoc_Info _ObjInfo = new WikiDoc_Info(); string _casecode = ""; if (RouteData.Values.ContainsKey("id")) { _casecode = RouteData.Values["id"].ToString(); } try { _ObjInfo = _WikiDoc_BL.PortalWikiDoc_GetByCaseCode(_casecode); ViewBag.CataInfo = _ObjInfo; // lấy dữ liệu lịch sử giao dịch B_Todos_BL _B_Todos_BL = new B_Todos_BL(); List <B_Remind_Info> _ListRemind = new List <B_Remind_Info>(); List <B_Todos_Info> _Listtodo = _B_Todos_BL.NotifiGetByCasecode(_casecode, ref _ListRemind); ViewBag.ListTodo = _Listtodo; ViewBag.ListRemind = _ListRemind; } catch (Exception ex) { Logger.LogException(ex); } return(PartialView("~/Areas/Wiki/Views/WikiDoc/_PartialWikiApproOrReject.cshtml", _ObjInfo)); }
public ActionResult SearchShowTodo() { if (SessionData.CurrentUser == null) { return(Redirect("/account/dang-xuat")); } try { SearchObject_BL _searchBL = new SearchObject_BL(); SearchObject_Header_Info _HeaderInfo = new SearchObject_Header_Info(); List <SearchObject_Detail_Info> _ListDetail = new List <SearchObject_Detail_Info>(); SearchObject_Question_Info _QuestionInfo = new SearchObject_Question_Info(); List <AppClassDetailInfo> search_Class_Infos = new List <AppClassDetailInfo>(); string _casecode = ""; if (RouteData.Values.ContainsKey("id")) { _casecode = RouteData.Values["id"].ToString(); _HeaderInfo = _searchBL.SEARCH_HEADER_GETBY_CASECODE(_casecode, ref _ListDetail, ref _QuestionInfo, ref search_Class_Infos); ViewBag.SearchHeader = _HeaderInfo; ViewBag.SearchListDetail = _ListDetail; ViewBag.QuestionInfo = _QuestionInfo; // lấy dữ liệu lịch sử giao dịch B_Todos_BL _B_Todos_BL = new B_Todos_BL(); List <B_Remind_Info> _ListRemind = new List <B_Remind_Info>(); List <B_Todos_Info> _Listtodo = _B_Todos_BL.NotifiGetByCasecode(_casecode, ref _ListRemind); ViewBag.ListTodo = _Listtodo; ViewBag.ListRemind = _ListRemind; ViewBag.Currstatus = _HeaderInfo.STATUS; ViewBag.lstClassDetailInfo = search_Class_Infos; B_Todos_Info _B_Todos_Info = _B_Todos_BL.Todo_GetByCaseCode(_casecode, SessionData.CurrentUser.Username); if (_B_Todos_Info != null) { ViewBag.B_Todos_Info = _B_Todos_Info; } //action là view hay sửa decimal _operator_type = Convert.ToDecimal(Common.CommonData.CommonEnums.Operator_Type.Update); if (RouteData.Values.ContainsKey("id1")) { _operator_type = Convert.ToDecimal(RouteData.Values["id1"].ToString()); } ViewBag.Operator_Type = _operator_type; } } catch (Exception ex) { Logger.LogException(ex); } return(View(@"~\Areas\Manager\Views\SearchManage\Search_Detail.cshtml")); }
public ActionResult Notify_Billing(string p_keysearch, int p_CurrentPage, string p_column, string p_type_sort) { try { decimal _total_record = 0; string p_to = ""; string p_from = CommonFuc.Get_From_To_Page(p_CurrentPage, ref p_to); B_Todos_BL _obj_bl = new B_Todos_BL(); string htmlPaging = ""; if (p_keysearch.Contains("REMIND")) { List <B_Remind_Info> _lst1 = _obj_bl.Notify_R_Search(p_keysearch, SessionData.CurrentUser.Username, ref _total_record, p_from, p_to); ViewBag.Obj = _lst1; htmlPaging = WebApps.CommonFunction.AppsCommon.Get_HtmlPaging <B_Remind_Info>((int)_total_record, p_CurrentPage, "Nội dung"); } else { List <B_Todos_Info> _lst = _obj_bl.Notify_Search(p_keysearch, SessionData.CurrentUser.Username, ref _total_record, p_from, p_to); htmlPaging = WebApps.CommonFunction.AppsCommon.Get_HtmlPaging <B_Todos_Info>((int)_total_record, p_CurrentPage, "Nội dung"); ViewBag.Obj = _lst; } ViewBag.Paging = htmlPaging; ViewBag.SumRecord = _total_record; } catch (Exception ex) { Logger.LogException(ex); } string[] _arr = p_keysearch.Split('|'); if (_arr.Length > 0) { if (_arr[0] == "TODO") { return(PartialView("~/Areas/Home/Views/Shared/_TodoData.cshtml")); } else if (_arr[0] == "ORDER") { return(PartialView("~/Areas/Home/Views/Shared/_OrderData.cshtml")); } else if (_arr[0] == "REMIND") { return(PartialView("~/Areas/Home/Views/Shared/_RemindData.cshtml")); } } return(PartialView("~/Areas/Home/Views/Shared/_TodoData.cshtml")); }
public ActionResult Notify_Display() { try { if (SessionData.CurrentUser == null) { return(Redirect("/")); } string _type = B_Todo.TypeProcess; if (RouteData.Values["id"] != null && RouteData.Values["id"].ToString() != "") { _type = RouteData.Values["id"].ToString(); } decimal _total_record = 0; B_Todos_BL _obj_bl = new B_Todos_BL(); string keysSearch = _type + "|" + "ALL" + "|" + "ALL" + "|" + "ALL" + "|" + "ALL"; string htmlPaging = ""; if (_type == "REMIND") { List <B_Remind_Info> _lst = _obj_bl.Notify_R_Search(keysSearch, SessionData.CurrentUser.Username, ref _total_record); htmlPaging = WebApps.CommonFunction.AppsCommon.Get_HtmlPaging <B_Remind_Info>((int)_total_record, 1, "Nội dung"); ViewBag.Obj = _lst; } else { List <B_Todos_Info> _lst = _obj_bl.Notify_Search(keysSearch, SessionData.CurrentUser.Username, ref _total_record); htmlPaging = WebApps.CommonFunction.AppsCommon.Get_HtmlPaging <B_Todos_Info>((int)_total_record, 1, "Nội dung"); ViewBag.Obj = _lst; } ViewBag.Paging = htmlPaging; ViewBag.SumRecord = _total_record; ViewBag.Type = _type; return(View("~/Areas/Manager/Views/Notify/Notify_Display.cshtml")); } catch (Exception ex) { Logger.LogException(ex); return(View()); } }
public ActionResult EditNewsArticles() { try { if (SessionData.CurrentUser == null) { return(Redirect("/")); } decimal pIDArticles = 0; int Status = 0; if (RouteData.Values.ContainsKey("id")) { pIDArticles = CommonFuc.ConvertToDecimal(RouteData.Values["id"]); } if (RouteData.Values.ContainsKey("id2")) { Status = CommonFuc.ConvertToInt(RouteData.Values["id2"]); } ViewBag.Status = Status; var objNewsBL = new NewsBL(); ViewBag.lstCategory = WebApps.CommonFunction.AppsCommon.AllCode_GetBy_CdTypeCdName("ARTICLES", "CATEGORIES"); string language = AppsCommon.GetCurrentLang(); var objNewInfo = objNewsBL.ArticlesGetById(pIDArticles, language); if (SessionData.CurrentUser != null && SessionData.CurrentUser.Type != (decimal)CommonEnums.UserType.Customer) { B_Todos_BL _B_Todos_BL = new B_Todos_BL(); B_Todos_Info _B_Todos_Info = _B_Todos_BL.Todo_GetByCaseCode(objNewInfo.Case_Code, SessionData.CurrentUser.Username); if (_B_Todos_Info != null) { ViewBag.B_Todos_Info = _B_Todos_Info; } } return(View("~/Areas/Articles/Views/ArticlesNews/_PartialviewEdit.cshtml", objNewInfo)); } catch (Exception ex) { Logger.LogException(ex); return(View()); } }
public ActionResult TodoNews() { try { if (SessionData.CurrentUser == null) { return(Redirect("/")); } string _casecode = ""; if (RouteData.Values.ContainsKey("id")) { _casecode = RouteData.Values["id"].ToString(); } if (SessionData.CurrentUser != null && SessionData.CurrentUser.Type != (decimal)CommonEnums.UserType.Customer) { B_Todos_BL _B_Todos_BL = new B_Todos_BL(); B_Todos_Info _B_Todos_Info = _B_Todos_BL.Todo_GetByCaseCode(_casecode, SessionData.CurrentUser.Username); if (_B_Todos_Info != null) { ViewBag.B_Todos_Info = _B_Todos_Info; } } var objNewsBL = new NewsBL(); ViewBag.lstCategory = WebApps.CommonFunction.AppsCommon.AllCode_GetBy_CdTypeCdName("ARTICLES", "CATEGORIES"); string language = AppsCommon.GetCurrentLang(); var objNewInfo = objNewsBL.ArticlesGetByCaseCode(_casecode, language); if (objNewInfo != null) { ViewBag.Status = objNewInfo.Status; } return(View("~/Areas/Articles/Views/ArticlesNews/_Partial_Approve.cshtml", objNewInfo)); } catch (Exception ex) { Logger.LogException(ex); return(View()); } }
public ActionResult do_Remind(decimal p_type, string p_case_code, decimal p_ref_id) { try { B_Todos_BL _obj_bl = new B_Todos_BL(); var modifiedBy = SessionData.CurrentUser.Username; bool _result = _obj_bl.Remind_Insert_ByTodo(p_type, p_case_code, p_ref_id, SessionData.CurrentUser.Username, AppsCommon.GetCurrentLang()); if (_result) { return(Json(new { success = 1 })); } else { return(Json(new { success = -1 })); } } catch (Exception ex) { Logger.LogException(ex); return(Json(new { success = -1 })); } }
public ActionResult App_Re_Grant2Lawer() { try { if (SessionData.CurrentUser == null) { return(Redirect("/")); } string p_case_code = ""; if (RouteData.Values.ContainsKey("id")) { p_case_code = RouteData.Values["id"].ToString(); } // action là view hay sửa decimal _operator_type = Convert.ToDecimal(Common.CommonData.CommonEnums.Operator_Type.Update); if (RouteData.Values.ContainsKey("id1")) { _operator_type = Convert.ToDecimal(RouteData.Values["id1"].ToString()); } ViewBag.Operator_Type = _operator_type; Application_Header_BL _objBl = new Application_Header_BL(); ApplicationHeaderInfo _ApplicationHeaderInfo = _objBl.GetApp_By_Case_Code_Todo(p_case_code, SessionData.CurrentUser.Username, AppsCommon.GetCurrentLang()); string pAppCode = _ApplicationHeaderInfo.Appcode; SessionData.CurrentUser.chashFile.Clear(); ViewBag.Appcode = pAppCode; ViewBag.Currstatus = (int)_ApplicationHeaderInfo.Status; ViewBag.objAppHeaderInfo = _ApplicationHeaderInfo; // ép cứng đến 1 trạng thái ViewBag.Re_Grant = 1; if (RouteData.Values.ContainsKey("id2")) { ViewBag.Hard_Status = Convert.ToDecimal(RouteData.Values["id2"].ToString()); } // lấy dữ liệu lịch sử giao dịch B_Todos_BL _B_Todos_BL = new B_Todos_BL(); List <B_Remind_Info> _ListRemind = new List <B_Remind_Info>(); List <B_Todos_Info> _Listtodo = _B_Todos_BL.NotifiGetByCasecode(p_case_code, ref _ListRemind); ViewBag.ListTodo = _Listtodo; ViewBag.ListRemind = _ListRemind; // sau advise filing if (_ApplicationHeaderInfo.Status >= (decimal)CommonEnums.App_Status.AdminGuiKetQuaNopDon && _ApplicationHeaderInfo.Status != (decimal)CommonEnums.App_Status.AdminTuChoiKetQuaNopDon) { // LẤY THÔNG TIN CỦA THẰNG NOTICE APP App_Notice_Info_BL _notice_BL = new App_Notice_Info_BL(); App_Notice_Info _App_Notice_Info = _notice_BL.App_Notice_GetBy_CaseCode(p_case_code); ViewBag.App_Notice_Info = _App_Notice_Info; return(View("/Areas/TradeMark/Views/Shared/AppDetail/AppDetails_After_Filing.cshtml")); } else { return(View("/Areas/TradeMark/Views/Shared/AppDetail/AppDetails.cshtml")); } } catch (Exception ex) { Logger.LogException(ex); return(View("/Areas/TradeMark/Views/Shared/AppDetail/AppDetails.cshtml")); } }
private void ThreadReadTodo4SendEmail() { int _timeSleep = Convert.ToInt16(CommonFuc.GetConfig("TimeSleepSendMail")); while (true) { try { //if (DateTime.Now.ToString("HH:mm") == "00:55" && Common.c_is_call_change_remind == false) //{ // B_Remind_BL _bl = new B_Remind_BL(); // _bl.Auto_change_remind(); // Logger.Log().Info("ChangeRemind " + DateTime.Now.ToString("dd/MM/yyyy")); // Common.c_is_call_change_remind = true; //} //else if (DateTime.Now.ToString("HH:mm") != "00:55") //{ // Common.c_is_call_change_remind = false; //} // đọc thông tin cần gửi email B_Todos_BL _B_Todos_BL = new B_Todos_BL(); List <B_Todos_Info> _lst = _B_Todos_BL.GetSend_Email(); List <string> _LstAttachment = new List <string>(); List <B_Todos_Info> _lst_update = new List <B_Todos_Info>(); foreach (B_Todos_Info item in _lst) { Email_Info _Email_Info = new Email_Info { EmailFrom = EmailHelper.EmailOriginal.EMailFrom, Pass = EmailHelper.EmailOriginal.PassWord, Display_Name = EmailHelper.EmailOriginal.DisplayName, EmailTo = item.Email_Send, EmailCC = "", Subject = item.Subject, Content = item.CONTENT, LstAttachment = _LstAttachment, }; CommonFunction.AppsCommon.EnqueueSendEmail(_Email_Info); // update todo-id _lst_update.Add(item); Thread.Sleep(_timeSleep); } // update todo-id if (_lst_update.Count > 0) { _B_Todos_BL.Update_Todo_Email(_lst_update); } Thread.Sleep(10000); } catch (Exception ex) { Thread.Sleep(2000); Logger.Log().Error(ex.ToString()); } } }