// GET: SumissionForm public ActionResult Form() { try { ViewBag.Message = "Passport Details"; return(View()); } catch (Exception ex) { ErrorLogService.LogError(ex); throw; } }
public IdentificationType GetIdentificationTypeById(string _IdentificationId) { try { return(_IUoW.Repository <IdentificationType>().GetById(_IdentificationId)); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetCusIdentificationTypeById(string)", string.Empty); return(null); } }
public AccStatusSetup GetAccStatusSetupById(string _AccountStatusId) { try { return(_IUoW.Repository <AccStatusSetup>().GetById(_AccountStatusId)); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAccStatusSetupById(string)", string.Empty); return(null); } }
public PostOfficeInfo GetPOInfoById(string _POInfoId) { try { return _IUoW.Repository<PostOfficeInfo>().GetById(_POInfoId); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetPOInfoById(string)", string.Empty); return null; } }
public GLChart GetGLChartByAccNo(string _GLAccNo) { try { return(_IUoW.Repository <GLChart>().GetBy(x => x.GLAccNo == _GLAccNo)); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetGLChartByAccSl(string)", string.Empty); return(null); } }
public CityInfo GetCityInfoById(string _CityId) { try { return(_IUoW.Repository <CityInfo>().GetById(_CityId)); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetCityInfoById(string)", string.Empty); return(null); } }
public IEnumerable <SelectListItem> GetReportFunctionForDD() { try { _IUoW = new UnitOfWork(); List <GetReportFunctionIdsResult> LIST_GetMFSReportMenuResult = new List <GetReportFunctionIdsResult>(); string url = ConfigurationManager.AppSettings["LgurdaService_server"] + "/GetReportFunctionIds/09?format=json"; using (WebClient wc = new WebClient()) { ReportMenuService OBJ_GetMFSReportMenuResult = new ReportMenuService(); //commented for temporary time by salekin var json = wc.DownloadString(url); OBJ_GetMFSReportMenuResult = JsonConvert.DeserializeObject <ReportMenuService>(json); LIST_GetMFSReportMenuResult = OBJ_GetMFSReportMenuResult.GetReportFunctionIdsResult; } if (LIST_GetMFSReportMenuResult == null) { return(null); } var selectList = new List <SelectListItem>(); for (int j = 0; j < LIST_GetMFSReportMenuResult.Count(); j++) { if (LIST_GetMFSReportMenuResult[j].FUNCTION_ID != null) { selectList.Add(new SelectListItem { Value = LIST_GetMFSReportMenuResult[j].FUNCTION_ID.ToString(), Text = LIST_GetMFSReportMenuResult[j].FUNCTION_NM }); } } if (selectList != null) { return(selectList); } else { return(null); } } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetReportFunctionForDD()", string.Empty); return(null); } }
public IEnumerable <IdentificationType> GetAllIdentificationType() { try { return(_IUoW.Repository <IdentificationType>().Get(x => x.AuthStatusId == "A" && x.LastAction != "DEL").OrderByDescending(x => x.IdentificationId)); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllIdentificationType()", string.Empty); return(null); } }
public string GetTotalUSBAmount() { try { var _TotalCashOut = _IUoW.mTakaDbQuery().GetTotalUSBAmount_LQ(); return(_TotalCashOut); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetSumValue()", string.Empty); return(null); } }
public IEnumerable <GLChart> GetAllGLChart() { try { return(_IUoW.Repository <GLChart>().Get(x => x.AuthStatusId == "A" && x.LastAction != "DEL").OrderByDescending(x => x.GLAccSl)); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllGLChart()", string.Empty); return(null); } }
public IEnumerable <PromoCodeConfig> GetAllPromoCodeConfig() { try { var AllPromoCodeConfig = _IUoW.mTakaDbQuery().GetAllPromoCodeConfig_LQ().OrderByDescending(x => x.ConfigurationId); return(AllPromoCodeConfig); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllPromoCodeConfig()", string.Empty); return(null); } }
public string getAccountType(string AccountTypeId) { try { var _AccountType = _IUoW.mTakaDbQuery().getAccountType_LQ(AccountTypeId); return(_AccountType); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "getAccountType()", string.Empty); return(null); } }
public List <EducationalHistoryModel> GetAllEducationalHistoryList(EducationalHistoryModel model) { List <EducationalHistoryModel> EducationalHistoryModelList = new List <EducationalHistoryModel>(); EducationalHistoryModel EducationalHistoryModel = new EducationalHistoryModel(); try { List <Staff_EducationalHistory> EducationalHistoryList = _EducationalHistoryRepository.GetAllEducationalHistoryList(); if (EducationalHistoryList != null) { EducationalHistoryList.ForEach(a => { EducationalHistoryModel = Mapper.Map <Staff_EducationalHistory, EducationalHistoryModel>(a); EducationalHistoryModel.Country = Mapper.Map <Master_Country, CountryModel>(a.Master_Country); EducationalHistoryModel.Staff = Mapper.Map <Staff, StaffModel>(a.Staff); if (EducationalHistoryModel.Country != null) { EducationalHistoryModel.Country.Name = Utility.GetPropertyValue(EducationalHistoryModel.Country, "Name", model.CurrentCulture) == null ? string.Empty : Utility.GetPropertyValue(EducationalHistoryModel.Country, "Name", model.CurrentCulture).ToString(); } //if (EducationalHistoryModel.Staff != null) // EducationalHistoryModel.Staff.NickName = Utility.GetPropertyValue(EducationalHistoryModel.Staff, "NickName", model.CurrentCulture) == null ? string.Empty : // Utility.GetPropertyValue(EducationalHistoryModel.Staff, "NickName", model.CurrentCulture).ToString(); if (EducationalHistoryModel.Education != null) { EducationalHistoryModel.Education.Name = Utility.GetPropertyValue(EducationalHistoryModel.Education, "Name", model.CurrentCulture) == null ? string.Empty : Utility.GetPropertyValue(EducationalHistoryModel.Education, "Name", model.CurrentCulture).ToString(); } if (EducationalHistoryModel.MajorSubject != null) { EducationalHistoryModel.MajorSubject.Name = Utility.GetPropertyValue(EducationalHistoryModel.MajorSubject, "Name", model.CurrentCulture) == null ? string.Empty : Utility.GetPropertyValue(EducationalHistoryModel.MajorSubject, "Name", model.CurrentCulture).ToString(); } EducationalHistoryModel.CurrentUserID = model.CurrentUserID; EducationalHistoryModel.CurrentCulture = model.CurrentCulture; EducationalHistoryModelList.Add(EducationalHistoryModel); }); } } catch (Exception ex) { IErrorLogService errorLog = new ErrorLogService(); string message = ex.InnerException != null ? ex.InnerException.InnerException.Message : ex.Message; errorLog.SetErrorLog(model.CurrentUserID, "EducationalHistory", message); throw new Exception(ex.Message); } return(EducationalHistoryModelList); }
public IEnumerable <SpecialOffers> GetAllSpecialOffers() { try { var AllSpecialOffer = _IUoW.mTakaDbQuery().GetAllSpecialOffer_LQ().OrderByDescending(x => x.OfferId); return(AllSpecialOffer); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllSpecialOffer()", string.Empty); return(null); } }
public IEnumerable <USBReportingField> GetAllUSBReportingField() { try { var ProviderNameList = _IUoW.mTakaDbQuery().GetAllProviderName_LQ(); return(ProviderNameList); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllUSBReportingField()", string.Empty); return(null); } }
public string TotalCashIn() { try { var _TotalCashIn = _IUoW.mTakaDbQuery().GetTotalCashIn_LQ(); return(_TotalCashIn); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "TotalCashIn()", string.Empty); return(null); } }
public IEnumerable <ManagerType> GetAllManagerType() { try { var AllManagerType = _IUoW.mTakaDbQuery().GetAllManType_LQ().OrderByDescending(x => x.ManTypeId); return(AllManagerType); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllManagerType()", string.Empty); return(null); } }
public void Should_Archieve_ErrorLog() { var service = new ErrorLogService(_repository); var appService = new ErrorLogAppService(service, _mapper); var actual = appService.Find(a => a.Id == fakeData[0].Id).FirstOrDefault(); Assert.NotNull(actual); Assert.False(actual.Archieved); var changed = appService.ArchieveErrorLog(actual.Id); Assert.NotNull(changed); Assert.True(changed.Archieved); }
public IEnumerable <CusTypeWiseServiceList> GetAllCusTypeWiseServiceList() { try { var CusTypeWiseServiceList = _IUoW.mTakaDbQuery().CusTypeWise_LQ(); return(CusTypeWiseServiceList); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllCusTypeWiseServiceList()", string.Empty); return(null); } }
public List <StaffModel> GetStaffList(BaseViewModel model) { List <StaffModel> usersInfoModelList = new List <StaffModel>(); StaffModel StaffModel = new StaffModel(); try { List <Staff> StaffList = _StaffRepository.GetStaffList(); if (StaffList != null) { StaffList.ForEach(a => { StaffModel = Mapper.Map <Staff, StaffModel>(a); StaffModel.FirstName = Utility.GetPropertyValue(StaffModel, "FirstName", model.CurrentCulture) == null ? string.Empty : Utility.GetPropertyValue(StaffModel, "FirstName", model.CurrentCulture).ToString(); StaffModel.MiddleName = Utility.GetPropertyValue(StaffModel, "MiddleName", model.CurrentCulture) == null ? string.Empty : Utility.GetPropertyValue(StaffModel, "MiddleName", model.CurrentCulture).ToString(); StaffModel.LastName = Utility.GetPropertyValue(StaffModel, "LastName", model.CurrentCulture) == null ? string.Empty : Utility.GetPropertyValue(StaffModel, "LastName", model.CurrentCulture).ToString(); StaffModel.Address = Utility.GetPropertyValue(StaffModel, "Address", model.CurrentCulture) == null ? string.Empty : Utility.GetPropertyValue(StaffModel, "Address", model.CurrentCulture).ToString(); StaffModel.HomeCountryAddress = Utility.GetPropertyValue(StaffModel, "HomeCountryAddress", model.CurrentCulture) == null ? string.Empty : Utility.GetPropertyValue(StaffModel, "HomeCountryAddress", model.CurrentCulture).ToString(); StaffModel.SelfPR = Utility.GetPropertyValue(StaffModel, "SelfPR", model.CurrentCulture) == null ? string.Empty : Utility.GetPropertyValue(StaffModel, "SelfPR", model.CurrentCulture).ToString(); StaffModel.Street = Utility.GetPropertyValue(StaffModel, "Street", model.CurrentCulture) == null ? string.Empty : Utility.GetPropertyValue(StaffModel, "Street", model.CurrentCulture).ToString(); StaffModel.TownName = Utility.GetPropertyValue(StaffModel, "TownName", model.CurrentCulture) == null ? string.Empty : Utility.GetPropertyValue(StaffModel, "TownName", model.CurrentCulture).ToString(); StaffModel.Name = $"{StaffModel.FirstName} {StaffModel.LastName}"; StaffModel.StaffNo = a.StaffNo; StaffModel.CurrentUserID = model.CurrentUserID; StaffModel.CurrentCulture = model.CurrentCulture; usersInfoModelList.Add(StaffModel); }); } } catch (Exception ex) { IErrorLogService errorLog = new ErrorLogService(); string message = ex.InnerException != null ? ex.InnerException.InnerException.Message : ex.Message; errorLog.SetErrorLog(model.CurrentUserID, "Staff", message); throw new Exception(ex.Message); } return(usersInfoModelList); }
public List <TransproLanguagePriceDetailsModel> GetTransproLanguagePriceDetailsList(BaseViewModel model, string PriceCategoryID) { SqlCommand cmd; SqlDataReader DataReader; TransproLanguagePriceDetailsModel DetailsModel; List <TransproLanguagePriceDetailsModel> DetailsList = new List <TransproLanguagePriceDetailsModel>(); try { _sqlConnService2.OpenConnection(); cmd = new SqlCommand("SP_GetTransproLanguagePriceDetails", _sqlConnService2.CreateConnection()); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@PriceCategoryID", Guid.Parse(PriceCategoryID)); cmd.Parameters.AddWithValue("@CultureId", model.CurrentCulture); DataReader = cmd.ExecuteReader(); while (DataReader.Read() == true) { DetailsModel = new TransproLanguagePriceDetailsModel(); DetailsModel.ID = Guid.Parse(DataReader["ID"].ToString()); DetailsModel.PriceCategoryID = Guid.Parse(DataReader["PriceCategoryID"].ToString()); DetailsModel.DeliveryPlanID = Convert.ToInt64(DataReader["DeliveryPlanID"].ToString()); DetailsModel.DeliveryPlanName = DataReader["DeliveryPlanName"].ToString(); DetailsModel.DeliveryPlanType = Convert.ToInt32(DataReader["DeliveryPlanType"].ToString()); DetailsModel.DeliveryPlanTime = Convert.ToInt32(DataReader["DeliveryPlanTime"].ToString()); DetailsModel.LightPrice = Convert.ToDecimal(DataReader["LightPrice"].ToString()); DetailsModel.BusinessPrice = Convert.ToDecimal(DataReader["BusinessPrice"].ToString()); DetailsModel.ExpertPrice = Convert.ToDecimal(DataReader["ExpertPrice"].ToString()); DetailsModel.CurrentUserID = model.CurrentUserID; DetailsModel.CurrentCulture = model.CurrentCulture; DetailsModel.IsDefaultForView = Convert.ToBoolean(DataReader["IsDefaultForView"].ToString()); DetailsModel.SortBy = Convert.ToInt32(DataReader["SortBy"].ToString()); DetailsModel.IsMarkedForDelete = false; DetailsList.Add(DetailsModel); } DataReader.Close(); } catch (Exception ex) { IErrorLogService errorLog = new ErrorLogService(); string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message; errorLog.SetErrorLog(model.CurrentUserID, "Transpro", message); throw new Exception(message); } finally { _sqlConnService2.CloseConnection(); } return(DetailsList); }
public IEnumerable <AccTypeWiseTargetView> GetTargetInfoForGraph(AccTypeWiseTarget _AccTypeWiseTarget) { try { int i = 0; List <AccTypeWiseTargetView> UserNameList = new List <AccTypeWiseTargetView>(); dynamic Actual = _IUoW.mTakaDbQuery().ActualAmount_LQ(_AccTypeWiseTarget); if (Actual == null) { return(null); } var _ListAccTypeWiseTarget = _IUoW.Repository <AccTypeWiseTarget>().Get(x => x.AccCategoryId == _AccTypeWiseTarget.AccCategoryId && x.AccTypeId == _AccTypeWiseTarget.AccTypeId && x.DefineServiceId == _AccTypeWiseTarget.DefineServiceId && x.District == _AccTypeWiseTarget.District && x.Area == _AccTypeWiseTarget.Area && x.CalenderPrdId == _AccTypeWiseTarget.CalenderPrdId && x.AuthStatusId == "A" && x.LastAction != "DEL"). Select(s => s.Amount).ToList(); if (_AccTypeWiseTarget.AccTypeId == "004") { UserNameList = _IUoW.Repository <CustomerAccProfile>().Get(x => x.PermanentDistrict == _AccTypeWiseTarget.District && x.AccTypeId == _AccTypeWiseTarget.AccTypeId && x.PermanentArea == _AccTypeWiseTarget.Area) .Select(s => new AccTypeWiseTargetView { name = s.UserName, market1 = 1, market2 = Convert.ToInt32(s.PermanentDistrict), target = Convert.ToInt32(_ListAccTypeWiseTarget[0]) }).ToList(); } foreach (var element in UserNameList) { UserNameList[i].actual = Actual[i]; i++; } return(UserNameList); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetTargetInfoForGraph()", string.Empty); return(null); } }
public bool DeleteEstimationSubSpecializedField(EstimationSubSpecializedFieldModel aMECM) { try { _messfRepository.DeleteEstimationSubSpecializedField(aMECM.ID); } catch (Exception ex) { IErrorLogService errorLog = new ErrorLogService(); string message = ex.InnerException != null ? ex.InnerException.InnerException.Message : ex.Message; errorLog.SetErrorLog(aMECM.CurrentUserID, "EstimationSubSpecializedField", message); throw new Exception(ex.Message); } return(true); }
public IdentificationType GetIdentificationTypeBy(IdentificationType _IdentificationId) { try { return(_IUoW.Repository <IdentificationType>().GetBy(x => x.IdentificationId == _IdentificationId.IdentificationId && x.AuthStatusId == "A" && x.LastAction != "DEL")); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetIdentificationTypeBy(string)", string.Empty); return(null); } }
public IEnumerable <UserActivityLog> UserActivityLogByAccNo(string _WalletAccountNo) { try { var AllctivityLog = _IUoW.Repository <UserActivityLog>().Get(x => x.WalletAccountNo == _WalletAccountNo).OrderByDescending(x => x.SlId); return(AllctivityLog); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "UserActivityLogByAccNo()", string.Empty); return(null); } }
public IEnumerable <BankInfo> GetAllBankInfo() { try { var abc = _IUoW.Repository <BankInfo>().Get(x => x.AuthStatusId == "A" && x.LastAction != "DEL").OrderByDescending(x => x.BankId); return(abc); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllBankInfo()", string.Empty); return(null); } }
public IEnumerable <AccCategory> GetAllAccCategory() { try { var AllAccCategory = _IUoW.Repository <AccCategory>().Get(x => x.AuthStatusId == "A" && x.LastAction != "DEL").OrderByDescending(x => x.AccCategoryId); return(AllAccCategory); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllAccCategory()", string.Empty); return(null); } }
public IEnumerable <AccLimitSetup> GetAllAccLimit() { try { var _AccLimit = _IUoW.mTakaDbQuery().AccLimit_LQ(); return(_AccLimit); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllAccLimit()", string.Empty); return(null); //throw ex; } }
public IEnumerable <USBReportingField> GetProviderRPTInfo(string DefineServiceId) { try { var RPTInfo = _IUoW.Repository <USBReportingField>().Get(x => x.DefineServiceId == DefineServiceId && x.AuthStatusId == "A" && x.ReportingType == "Output" && x.LastAction != "DEL").OrderByDescending(x => x.ReportingId); return(RPTInfo); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetProviderRPTInfo()", string.Empty); return(null); } }
public CusCategory GetCusCategoryBy(string _CusCategoryId) { try { return(_IUoW.Repository <CusCategory>().GetBy(x => x.CusCategoryId == _CusCategoryId && x.AuthStatusId == "A" && x.LastAction != "DEL")); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetCusCategoryBy(string)", string.Empty); return(null); } }
protected void Application_Error(object sender, EventArgs e) { var context = HttpContext.Current; if (context != null) { Exception ex = HttpContext.Current.Server.GetLastError(); //if (ex.Message == "授权已到期,请联系管理员。") //{ // context.Response.Redirect("~/Login.html"); // return; //} var logservice = new ErrorLogService(); var memberservice = new MemberService(); int uid = Convert.ToInt32(context.User.Identity.Name); var member = memberservice.FirstOrDefault(m => m.id == uid); var errorlog = new sys_ErrorLog { uid = member.id, RealName = member.RealName, LogContent = ex.InnerException.Message, Ip = GetIP, LogTime = DateTime.Now }; logservice.Add(errorlog); var errorcontent = new StringBuilder(); errorcontent.AppendLine(string.Format("<b>发生时间:</b>{0}<br/><br/>", DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"))); errorcontent.AppendLine(string.Format("<b>错误描述:</b>{0}<br/><br/>", ex.Message.Replace("\r\n", ""))); errorcontent.AppendLine(string.Format("<b>错误对象:</b>{0}<br/><br/>", ex.Source)); errorcontent.AppendLine(string.Format("<b>错误页面:</b>{0}<br/><br/>", HttpContext.Current.Request.Url)); errorcontent.AppendLine(string.Format("<b>浏览器IE:</b>{0}<br/><br/>", HttpContext.Current.Request.UserAgent)); errorcontent.AppendLine(string.Format("<b>服务器IP:</b>{0}<br/><br/>", HttpContext.Current.Request.ServerVariables.Get("Local_Addr"))); errorcontent.AppendLine(string.Format("<b>方法名称:</b>{0}<br/><br/>", ex.TargetSite)); errorcontent.AppendLine(string.Format("<b>C#类名称:</b>{0}<br/><br/>", ex.TargetSite.DeclaringType)); errorcontent.AppendLine(string.Format("<b>成员变量:</b>{0}<br/><br/>", ex.TargetSite.MemberType)); Cookie.SetObj("ERRORINFO", errorcontent.ToString()); Server.ClearError(); //出错画面处理 context.Response.Redirect("~/ErrorPage.aspx"); } }