Exemplo n.º 1
0
 private void Awake()
 {
     if (s != null)
     {
         Debug.LogError(string.Format("More than one singleton copy of {0} is detected! this shouldn't happen.", this.ToString()));
     }
     s = this;
 }
Exemplo n.º 2
0
        public void InsertToInfo()
        {
            HshldDao dao = FactoryDao.Instance().GetHshldDao();
            String   cd  = FactoryMaster.Instance().GetCategoryMaster().GetAll().First().Cd;
            String   tp  = FactoryMaster.Instance().GetTypeMaster().GetByCategoryCode(cd).First().TP;

            dao.InsertToInfo("TEST1", "tester", cd, tp, DateTime.Now.ToString("yyyy-MM-dd"), "TEST", "1");
            Console.WriteLine("Press Any Key...");
        }
Exemplo n.º 3
0
 private SearchResultBean.Node CreateSumCreditNode(Decimal price)
 {
     SearchResultBean.Node node = new SearchResultBean.Node();
     node.Day      = "--";
     node.Type     = FactoryMaster.Instance().GetTypeMaster().GetTypeNameByCode("002");
     node.Category = FactoryMaster.Instance().GetCategoryMaster().GetCategoryNameByCode("020");
     node.Content  = FactoryMaster.Instance().GetCategoryMaster().GetCategoryNameByCode("020");
     node.PriceNum = price;
     return(node);
 }
Exemplo n.º 4
0
 private SearchResultBean.Node CreateSumCreditNode(Decimal price)
 {
     SearchResultBean.Node node = new SearchResultBean.Node();
     node.Day      = "--";
     node.Type     = FactoryMaster.Instance().GetTypeMaster().Where(item => String.Equals(item.Tp, "002")).Single().Nm;
     node.Category = FactoryMaster.Instance().GetCategoryMaster().Where(item => String.Equals(item.Cd, "020")).Single().Nm;
     node.Content  = node.Category;
     node.PriceNum = price;
     return(node);
 }
Exemplo n.º 5
0
 private SearchResultBean.Node CreateNode(Hshld entity)
 {
     SearchResultBean.Node node = new SearchResultBean.Node();
     node.Idx      = entity.Ndx;
     node.Tp       = entity.Tp;
     node.Cd       = entity.Cd;
     node.Date     = entity.Dt;
     node.Day      = entity.Dt.Day.ToString();
     node.Type     = FactoryMaster.Instance().GetTypeMaster().GetTypeNameByCode(entity.Tp);
     node.Category = FactoryMaster.Instance().GetCategoryMaster().GetCategoryNameByCode(entity.Cd);
     node.Content  = entity.Cntxt;
     node.PriceNum = Util.GetPlusMinus(entity.Tp) ? entity.Prc : entity.Prc * -1;
     node.Pdt      = entity.Pdt.ToString(Define.PDT_FORMAT);
     return(node);
 }
Exemplo n.º 6
0
        public static String GetCategoryOption()
        {
            StringBuilder  buffer = new StringBuilder();
            CategoryMaster list   = FactoryMaster.Instance().GetCategoryMaster();

            foreach (Category category in list)
            {
                buffer.Append("<option value='");
                buffer.Append(category.Cd);
                buffer.Append("' >");;
                buffer.Append(category.Nm);
                buffer.Append("</option>");
            }
            return(buffer.ToString());
        }
Exemplo n.º 7
0
        public static String GetSearchOption()
        {
            StringBuilder buffer = new StringBuilder();
            var           list   = FactoryMaster.Instance().GetTypeMaster().GetBySearchCode();

            foreach (var l in list)
            {
                buffer.Append("<option value='");
                buffer.Append(l.Tp);
                buffer.Append("'>");
                buffer.Append(l.Nm);
                buffer.Append("</option>");
            }
            return(buffer.ToString());
        }
Exemplo n.º 8
0
        public static String GetCategoryOption()
        {
            StringBuilder buffer = new StringBuilder();
            IList <Ctgry> list   = FactoryMaster.Instance().GetCategoryMaster().GetAll();

            foreach (Ctgry l in list)
            {
                buffer.Append("<option value='");
                buffer.Append(l.Cd);
                buffer.Append("' >");;
                buffer.Append(l.Nm);
                buffer.Append("</option>");
            }
            return(buffer.ToString());
        }
Exemplo n.º 9
0
 private SearchResultBean.Node CreateNode(HouseHold entity)
 {
     SearchResultBean.Node node = new SearchResultBean.Node();
     node.Idx      = entity.Index;
     node.Tp       = entity.Tp;
     node.Cd       = entity.Ctgry;
     node.Date     = entity.Date;
     node.Day      = entity.Date.Day.ToString();
     node.Type     = FactoryMaster.Instance().GetTypeMaster().Where(item => String.Equals(item.Tp, entity.Tp)).Single().Nm;
     node.Category = FactoryMaster.Instance().GetCategoryMaster().Where(item => String.Equals(item.Cd, entity.Ctgry)).Single().Nm;
     node.Content  = entity.Context;
     node.PriceNum = Util.GetPlusMinus(entity.Tp) ? entity.Price : entity.Price * -1;
     node.Pdt      = entity.Createdate.ToString(Define.PDT_FORMAT);
     return(node);
 }
Exemplo n.º 10
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            AuthConfig.RegisterAuth();

            XmlConfigurator.Configure();
            ILog logger = LogManager.GetLogger("ApplicationStart");
            logger.Info("Started up this program.");
            FactoryDao.CreateInstance(System.Configuration.ConfigurationManager.ConnectionStrings["householdConn"].ConnectionString);
            FactoryMaster.Instance();
        }
Exemplo n.º 11
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            AuthConfig.RegisterAuth();


            HttpConnector.CreateInstance(HtmlUtil.GetConfig("serviceUrl"));
            HtmlUtil.Initialize(HtmlUtil.GetConfig("clientID"), HtmlUtil.GetConfig("clientSecret"), HtmlUtil.GetConfig("redirectUrl"));
            FactoryMaster.CreateInstance();

            XmlConfigurator.Configure();
            ILog logger = LogManager.GetLogger("ApplicationStart");

            logger.Info("Started up this program.");
        }
Exemplo n.º 12
0
        public static String GetTypeTemplateOption()
        {
            StringBuilder buffer = new StringBuilder();
            IList <Ctgry> list   = FactoryMaster.Instance().GetCategoryMaster().GetAll();

            foreach (Ctgry l in list)
            {
                buffer.Append("<select id='select_");
                buffer.Append(l.Cd);
                buffer.Append("' >");
                IList <Tp> tplist = FactoryMaster.Instance().GetTypeMaster().GetByCategoryCode(l.Cd);
                foreach (Tp t in tplist)
                {
                    buffer.Append("<option value='");
                    buffer.Append(t.TP);
                    buffer.Append("'>");
                    buffer.Append(t.Nm);
                    buffer.Append("</option>");
                }
                buffer.Append("</select>");
            }
            return(buffer.ToString());
        }
Exemplo n.º 13
0
        public static String GetTypeTemplateOption()
        {
            StringBuilder  buffer = new StringBuilder();
            CategoryMaster master = FactoryMaster.Instance().GetCategoryMaster();

            foreach (Category l in master)
            {
                buffer.Append("<select id='select_");
                buffer.Append(l.Cd);
                buffer.Append("' >");
                var tplist = FactoryMaster.Instance().GetTypeMaster().GetByCategory(l.Cd);
                foreach (Household.Models.Entity.Type t in tplist)
                {
                    buffer.Append("<option value='");
                    buffer.Append(t.Tp);
                    buffer.Append("'>");
                    buffer.Append(t.Nm);
                    buffer.Append("</option>");
                }
                buffer.Append("</select>");
            }
            return(buffer.ToString());
        }
 public EmploymentTypeController(IFactoryMaster repo)
 {
     _repo = FactoryMaster.GetFactoryObj("employment"); //repo;
 }
Exemplo n.º 15
0
 public CompanyController(IFactoryMaster repo)
 {
     _repo = FactoryMaster.GetFactoryObj("company"); //repo;
 }
 public DepartmentController(IFactoryMaster repo)
 {
     _repo = FactoryMaster.GetFactoryObj("dept"); //repo;
 }
 public UniversityController(IFactoryMaster repo)
 {
     _repo = FactoryMaster.GetFactoryObj("University"); //repo;
 }
Exemplo n.º 18
0
 public RolesController(IFactoryMaster repo)
 {
     _repo = FactoryMaster.GetFactoryObj("role"); //repo;
 }
Exemplo n.º 19
0
 public ExperienceController(IFactoryMaster repo)
 {
     _repo = FactoryMaster.GetFactoryObj("experience"); //repo;
 }
Exemplo n.º 20
0
 public SkillsController(IFactoryMaster repo)
 {
     _repo = FactoryMaster.GetFactoryObj("skills"); //repo;
 }
 public LocationController(IFactoryMaster repo)
 {
     //_repo = repo;
     _repo = FactoryMaster.GetFactoryObj("loc"); //repo;
 }
Exemplo n.º 22
0
 public InstituteController(IFactoryMaster repo)
 {
     _repo = FactoryMaster.GetFactoryObj("institute"); //repo;
 }