Ejemplo n.º 1
0
        public static void Test(EntityObject obj)
        {
            T_FB_TRAVELEXPAPPLYMASTER bb = obj as T_FB_TRAVELEXPAPPLYMASTER;
            BaseBll<T_FB_TRAVELEXPAPPLYMASTER> b = new BaseBll<T_FB_TRAVELEXPAPPLYMASTER>();
            T_FB_TRAVELEXPAPPLYMASTER t = b.GetTable().First();
            T_FB_TRAVELEXPAPPLYDETAIL t1 = new T_FB_TRAVELEXPAPPLYDETAIL();

            T_FB_TRAVELEXPAPPLYDETAIL t2 = bb.T_FB_TRAVELEXPAPPLYDETAIL.ToList()[0];
            t.T_FB_TRAVELEXPAPPLYDETAIL.Add(t1);
            t.T_FB_TRAVELEXPAPPLYDETAIL.Add(t2);
            b.dal.GetDataContext().SaveChanges();
        }
Ejemplo n.º 2
0
        public static void Test(EntityObject obj)
        {
            T_FB_TRAVELEXPAPPLYMASTER           bb = obj as T_FB_TRAVELEXPAPPLYMASTER;
            BaseBll <T_FB_TRAVELEXPAPPLYMASTER> b  = new BaseBll <T_FB_TRAVELEXPAPPLYMASTER>();
            T_FB_TRAVELEXPAPPLYMASTER           t  = b.GetTable().First();
            T_FB_TRAVELEXPAPPLYDETAIL           t1 = new T_FB_TRAVELEXPAPPLYDETAIL();

            T_FB_TRAVELEXPAPPLYDETAIL t2 = bb.T_FB_TRAVELEXPAPPLYDETAIL.ToList()[0];

            t.T_FB_TRAVELEXPAPPLYDETAIL.Add(t1);
            t.T_FB_TRAVELEXPAPPLYDETAIL.Add(t2);
            b.dal.GetDataContext().SaveChanges();
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 获取所有公司
 /// </summary>
 /// <returns>所有有效的公司</returns>
 public List<CompanyModel> GetAllCompany()
 {
     using (BaseBll<T_HR_COMPANY> bsb = new BaseBll<T_HR_COMPANY>())
     {
         var companyList = from v in bsb.GetTable()
                           where v.EDITSTATE =="1" && v.CHECKSTATE=="2"
                           select new CompanyModel
                           {
                               CompanyID = v.COMPANYID,
                               ShortName = v.BRIEFNAME,
                               CompanyName = v.CNAME,
                               ParentID = v.FATHERID,
                               SORTINDEX = v.SORTINDEX,
                               FatherType = v.FATHERTYPE
                           };
         return companyList.ToList();
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 获取所有公司
 /// </summary>
 /// <returns>所有有效的公司</returns>
 public List <CompanyModel> GetAllCompany()
 {
     using (BaseBll <T_HR_COMPANY> bsb = new BaseBll <T_HR_COMPANY>())
     {
         var companyList = from v in bsb.GetTable()
                           where v.EDITSTATE == "1" && v.CHECKSTATE == "2"
                           select new CompanyModel
         {
             CompanyID   = v.COMPANYID,
             ShortName   = v.BRIEFNAME,
             CompanyName = v.CNAME,
             ParentID    = v.FATHERID,
             SORTINDEX   = v.SORTINDEX,
             FatherType  = v.FATHERTYPE
         };
         return(companyList.ToList());
     }
 }