public LecturerCourseWorksController(IApplicationsService applicationsService, ICourseWorksService courseWorksService, IUserService userService) { _applicationsService = applicationsService; _courseWorksService = courseWorksService; _userService = userService; }
public ProfileService( IContentManager contentManager, IMembershipService membershipService, ISiteService siteService, IClock clock, IMessageService messageService, IShapeFactory shapeFactory, IApplicationsService applicationsService, IShapeDisplay shapeDisplay, IEncryptionService encryptionService, IRepository <UserProfilePartRecord> userprofileRepository, IRepository <UserApplicationRecord> userapplicationRepository, ISignals signals ) { _contentManager = contentManager; _membershipService = membershipService; _clock = clock; _applicationsService = applicationsService; _messageService = messageService; _shapeFactory = shapeFactory; _siteService = siteService; _encryptionService = encryptionService; _shapeDisplay = shapeDisplay; T = NullLocalizer.Instance; _userprofileRepository = userprofileRepository; _userapplicationRepository = userapplicationRepository; _signals = signals; }
public CourseWorksController(IApplicationsService applicationsService, ICourseWorksService courseWorksService, IUniversityService universityService, IUserService userService) { _applicationsService = applicationsService; _courseWorksService = courseWorksService; _universityService = universityService; _userService = userService; }
public ApplicationsController( IApplicationsService applicationsService, IAuthorisationService auth, IConfigurationService configuration ) : base(auth) { _applications = applicationsService; _configuration = configuration; }
public UploadApplicationController(IApplicationsService applications, ICategoriesService categories, IUsersService users, IImageService images) { this.applications = applications; this.categories = categories; this.users = users; this.images = images; }
public HomeController( IDirectorInfosService directors, IStudentInfosService students, IApplicationsService applications, IUniversitiesService universities) { this.directors = directors; this.students = students; this.applications = applications; this.universities = universities; }
public UniversitiesController( IUniversitiesService universities, IStudentInfosService studentInfos, IMajorsService majors, IApplicationsService applications) { this.universities = universities; this.studentInfos = studentInfos; this.majors = majors; this.applications = applications; }
public AccountController( IUserEventHandler userEventHandler, IProfileService profileService, IDetectMobileService detectMobileService, IApplicationsService applicationsService ) { _userEventHandler = userEventHandler; _profileService = profileService; _detectMobileService = detectMobileService; _applicationsService = applicationsService; }
public QuanLyNguoiDungController() { CurrentNguoidung = ((EISContext)FXContext.Current).CurrentNguoidung; UserDataService = IoC.Resolve <IuserService>(); RoleService = IoC.Resolve <IroleService>(); DmcosokcbService = IoC.Resolve <IDMCOSOKCBService>(); Nguoidung = IoC.Resolve <INGUOIDUNGService>(); DmDonviService = IoC.Resolve <IDM_DONVIService>(); ApplicationsService = IoC.Resolve <IApplicationsService>(); _iLogSystemService = IoC.Resolve <ILogSystemService>(); TypeRoleService = IoC.Resolve <ITYPE_ROLEService>(); GetValueCommon(); }
public userController( IOrchardServices orchardServices, IMembershipService membershipService, IApplicationsService applicationsService, IProfileService profileService ) { _membershipService = membershipService; _orchardServices = orchardServices; _applicationsService = applicationsService; _profileService = profileService; T = NullLocalizer.Instance; }
public loginController( IAuthenticationService authenticationService, IOrchardServices orchardServices, IMembershipService membershipService, IUserEventHandler userEventHandler, IApplicationsService applicationsService, IProfileService profileService, ILoginsService loginsService ) { _authenticationService = authenticationService; _orchardServices = orchardServices; _membershipService = membershipService; _userEventHandler = userEventHandler; _profileService = profileService; _applicationsService = applicationsService; _loginsService = loginsService; }
public LoginsService( IOrchardServices orchardServices, IContentManager contentManager, IClock clock, IApplicationsService applicationsService, IEncryptionService encryptionService, IRepository <UserProfilePartRecord> userprofileRepository, IRepository <UserApplicationRecord> userapplicationRepository, IRepository <LoginsRecord> loginsRepository ) { _orchardServices = orchardServices; _clock = clock; _applicationsService = applicationsService; _encryptionService = encryptionService; _userprofileRepository = userprofileRepository; _userapplicationRepository = userapplicationRepository; _loginsRepository = loginsRepository; }
public SchemasController(IApplicationsService applicationService, IDataSchemaService schemaService) : base(applicationService) { _schemaService = schemaService; }
public ApplicationFacade(IApplicationsService applicationService) { _applicationService = applicationService; }
public ApplicationsController(IApplicationsService applications, IStudentInfosService studentInfos, IMajorsService majors) { this.applications = applications; this.studentInfos = studentInfos; this.majors = majors; }
public ApplicationsController(IApplicationsService applications, IResponsesService responses) { this.applications = applications; this.responses = responses; }
public string UpdateCus(ApiPublish publish) { IuserService _userSvc = IoC.Resolve <IuserService>(); ICustomerService _cusSvc = IoC.Resolve <ICustomerService>(); IApplicationsService _appSvc = IoC.Resolve <IApplicationsService>(); IRegisterEmailService _emailSvc = IoC.Resolve <IRegisterEmailService>(); ILog log = LogManager.GetLogger(typeof(PublishController)); try { log.Info("updateCus DATA:" + publish.xmlData); //check valiadate xml XmlSchemaValidator validator = new XmlSchemaValidator(); //XMLCusData = convertSpecialCharacter(XMLCusData); if (!validator.ValidXmlDoc(publish.xmlData, "", AppDomain.CurrentDomain.BaseDirectory + @"XMLValidate\CustomerValidate.xsd")) { log.Error("updateCus ERR:3-UpdateCus " + validator.ValidationError); return("ERR:3");//du lieu dau vao khong hop le } if (publish.convert == 1) { publish.xmlData = DataHelper.convertTCVN3ToUnicode(publish.xmlData); } Applications _app = _appSvc.GetByName("EInvoice"); //Chu y fix cung phu hop voi services.config/IRBACMembershipProvider EInvoiceContext _Einvoicecontext = (EInvoiceContext)FXContext.Current; Company _currentCom = _Einvoicecontext.CurrentCompany; // get dữ liệu từ string xml XElement xelement = XElement.Parse(publish.xmlData); List <XElement> cusLst = (from item in xelement.Elements("Customer") select item).ToList(); List <string> codeLst = (from item in cusLst select item.Element("Code").Value).ToList(); string defaultPass = (_currentCom.Config.ContainsKey("SetDefaultCusPass")) ? _currentCom.Config["SetDefaultCusPass"] : "******"; string labelEmail = _currentCom.Config.Keys.Contains("LabelMail") ? _currentCom.Config["LabelMail"] : "*****@*****.**"; string portalLink = _currentCom.Config.Keys.Contains("PortalLink") ? _currentCom.Config["PortalLink"] : "http://hddt.v-invoice.vn"; _cusSvc.BeginTran(); StringBuilder msg = new StringBuilder(); foreach (var item in cusLst) { try { string code = item.Element("Code").Value.Trim(); var taxCode = Utils.formatTaxcode(item.Element("TaxCode").Value.Trim()); var cusDb = _cusSvc.Query.FirstOrDefault(x => x.Code == code && x.ComID == _currentCom.id); var userDb = _userSvc.Query.FirstOrDefault(x => x.username == code && x.GroupName == _currentCom.id.ToString()); // create if (cusDb == null) { if (userDb != null) { msg.AppendFormat("Ma KH: {0}. Khong the tao khach hang do user {0} da ton tai trong he thong.", code).AppendLine(); log.WarnFormat("Ma KH: {0}. Khong the tao khach hang do user {0} da ton tai trong he thong.", code); continue; } if (!String.IsNullOrWhiteSpace(taxCode) && _cusSvc.Query.Any(x => x.TaxCode == taxCode && x.ComID == _currentCom.id)) { msg.AppendFormat("Ma KH: {0}. Khong the tao khach hang do ma so thue {0} da ton tai trong he thong.", taxCode).AppendLine(); log.WarnFormat("Ma KH: {0}. Khong the tao khach hang do ma so thue {1} da ton tai trong he thong.", code, taxCode); continue; } var cus = new Customer { Code = code, AccountName = code, TaxCode = taxCode, Name = item.Element("Name").Value, Address = item.Element("Address").Value, BankAccountName = item.Element("BankAccountName").Value, BankName = item.Element("BankName").Value, BankNumber = item.Element("BankNumber").Value, Email = item.Element("Email").Value, Fax = item.Element("Fax").Value, Phone = item.Element("Phone").Value, ContactPerson = item.Element("ContactPerson").Value, RepresentPerson = item.Element("RepresentPerson").Value, CusType = String.IsNullOrWhiteSpace(item.Element("Name").Value) ? Int32.Parse(item.Element("Name").Value) : 0, DeliverMethod = 2, ComID = _currentCom.id }; string createCusErr; if (_cusSvc.CreateCus(cus, new Certificate(), _currentCom.id, out createCusErr)) { log.Info("updateCus Create Customer by: " + HttpContext.Current.User.Identity.Name + " Info-- TenKhachHang: " + cus.Name + " TaiKhoanKhachHang: " + cus.AccountName + " Email: " + cus.Email); // send Mail-- try { if (!string.IsNullOrEmpty(cus.Email)) { Dictionary <string, string> subjectParams = new Dictionary <string, string>(1); subjectParams.Add("$subject", ""); Dictionary <string, string> bodyParams = new Dictionary <string, string>(3); bodyParams.Add("$company", _currentCom.Name); bodyParams.Add("$cusname", cus.Name); bodyParams.Add("$username", cus.AccountName); bodyParams.Add("$password", defaultPass); bodyParams.Add("$portalLink", portalLink); _emailSvc.ProcessEmail(labelEmail, cus.Email, "RegisterCustomer", subjectParams, bodyParams); } } catch (Exception ex) { log.Warn("updateCus", ex); } } else { msg.AppendFormat("Ma KH: {0}. Khong the tao khach hang {0}. Thong bao loi: {1}", code, createCusErr).AppendLine(); log.Warn("updateCus Error: " + createCusErr); } } // update else { // update taxcode if (!String.IsNullOrWhiteSpace(taxCode) && cusDb.TaxCode != taxCode) { if (_cusSvc.Query.Any(x => x.TaxCode == taxCode && x.ComID == _currentCom.id)) { msg.AppendFormat("Ma KH: {0}. Khong the chinh sua thong tin khach hang {0} do ma so thue {1} da ton tai trong he thong.", code, taxCode).AppendLine(); continue; } cusDb.TaxCode = taxCode; } cusDb.Name = item.Element("Name").Value; cusDb.Address = item.Element("Address").Value; cusDb.BankAccountName = item.Element("BankAccountName").Value; cusDb.BankName = item.Element("BankName").Value; cusDb.BankNumber = item.Element("BankNumber").Value; cusDb.Email = item.Element("Email").Value; cusDb.Fax = item.Element("Fax").Value; cusDb.Phone = item.Element("Phone").Value; cusDb.ContactPerson = item.Element("ContactPerson").Value; cusDb.RepresentPerson = item.Element("RepresentPerson").Value; cusDb.CusType = String.IsNullOrWhiteSpace(item.Element("Name").Value) ? Int32.Parse(item.Element("Name").Value) : 0; } } catch (Exception ex) { _cusSvc.RolbackTran(); log.Error("Loi tao hoac cap nhat khach hang: " + item.Element("Code"), ex); return("ERR:2");//loi cap nhat khach hang le vao csdl } } _cusSvc.CommitTran(); return("OK:" + msg); } catch (Exception ex) { log.Error("updateCus: " + ex); throw ex; } }
public void Setup() { _applicationsRepository = new Mock <IApplicationsRespository>(); service = new ApplicationsService(_applicationsRepository.Object); fixture = new Fixture(); }
/// <summary> /// 初始化应用程序控制器 /// </summary> /// <param name="service">应用程序服务</param> public ApplicationsController(IApplicationsService service) { _applicationsService = service; }
public DownloadController(IApplicationsService applications, IUsersService users) { this.applications = applications; this.users = users; }
public ApplicationsController(IApplicationsService applicationService, IEmailsService emailService) { _applicationService = applicationService; _emailService = emailService; }
public ApplicationsController(IApplicationsService applicationsService, IMapper mapper) { _applicationsService = applicationsService; _mapper = mapper; }
public BaseApiController(IApplicationsService applicationsService) { _applicationsService = applicationsService; }
public ApplicationController(IApplicationsService applications) { this.applications = applications; }
public ApplicationsController(ITaskService taskService, IApplicationsService applicationsService) { _taskService = taskService; _applicationsService = applicationsService; }
public SoftwareStatementController(ISoftwareStatementService softwareStatementService, IApplicationsService apps) : base(apps) { _softwareStatementService = softwareStatementService; }
public ProvidersController(IApplicationsService apps) : base(apps) { _appService = apps; }
public LicenseAgreementsController(IApplicationsService apps, ISoftwareStatementService softwareStatementService) : base(apps) { _softwareStatementService = softwareStatementService; }
public ApplicantsController(IApplicationsService applicationsService) { this.applicationsService = applicationsService; }
public ApplicationsController(IApplicationsService applications, IMajorsService majors) { this.applications = applications; this.majors = majors; }
public UserApplicationsController(IApplicationsService applications, IUsersService users) { this.applications = applications; this.users = users; }