日期:2014-05-20 浏览次数:20784 次
private ST_ExtendPlanManager st_ExtendPlanManager;
public Form1()
{
InitializeComponent();
IApplicationContext context = ContextRegistry.GetContext();
st_ExtendPlanManager = (ST_ExtendPlanManager)context.GetObject("ST_ExtendPlanManager");
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Huojia.Model;
using Huojia.Dao;
using Huojia.Base;
using Huojia.IDao;
namespace Huojia.Manager
{
public class ST_ExtendPlanManager
{
private IST_ExtendPlanService service;
public IST_ExtendPlanService Service
{
get { return service; }
set { service = value; }
}
public IList<ST_ExtendPlan> GetAll()
{
IList < ST_ExtendPlan > list = service.SelectAll<ST_ExtendPlan>("/abc");
foreach (ST_ExtendPlan item in list)
{
item.title = item.branchCD.ToString() + "-" + item.branchName;
}
return list;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Huojia.Model;
using Huojia.Base;
using Huojia.IDao;
namespace Huojia.Dao
{
public class ST_ExtendPlanServiceImpl : IST_ExtendPlanService
{
}
}
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
</sectionGroup>