Ejemplo n.º 1
0
        /// <summary>
        /// 用于创建公司,审核认证
        /// </summary>
        public void NewByUserDT(M_Plat_Comp compMod, DataTable userDT)
        {
            B_Plat_Group gpBll = new B_Plat_Group();

            for (int i = 0; i < userDT.Rows.Count; i++)
            {
                string gname = userDT.Rows[i]["gname"].ToString();
                string uname = userDT.Rows[i]["uname"].ToString();
                string honey = userDT.Rows[i]["honey"].ToString();
                if (string.IsNullOrEmpty(uname))
                {
                    continue;
                }
                M_UserInfo newmu = buser.NewUser(uname, "111111");
                newmu.HoneyName = honey;
                newmu.UserID    = buser.Add(newmu);
                M_Uinfo basemu = buser.NewBase(newmu);
                buser.AddBase(basemu);
                //----能力相关信息
                M_Plat_Group gpMod = gpBll.NewGroup(gname, compMod.ID, newmu.UserID);
                M_User_Plat  upMod = NewUser(newmu, compMod);
                gpMod.ID  = gpBll.Insert(gpMod);
                upMod.Gid = gpMod.ID.ToString();
                Insert(upMod);
            }
        }