//
 /// <summary>
 /// 根据科室和科室人名进行查询
 /// </summary>
 private void SectionChanged()
 {
     cboSetionName.Items.Clear();
     //string sql1 = "";
     DataRow[] Rows;
     if (txtBox.Text.Trim() != "")
     {
         //sql1 = "select u.user_id,u.user_name,u.section_id,t.section_name from t_userinfo u  " +
         //           @" inner join t_sectioninfo t on t.sid=u.section_id where t.ISBELONGTOBIGSECTION='N' and t.section_name='" + lblSetionName.Text + "' and u.user_name like '%" + txtBox.Text.Trim() + "%'";
         Rows = DsData.Tables["Sections_Peoples"].Select("ISBELONGTOBIGSECTION='N' and role_type='D' and  section_id='" + Id + "' and  user_name like '%" + txtBox.Text.Trim() + "%'");
     }
     else
     {
         Rows = null;
     }
     if (Rows != null)
     {
         Cusername = new Class_User[Rows.Length];
         for (int i = 0; i < Rows.Length; i++)
         {
             Cusername[i]           = new Class_User();
             Cusername[i].User_id   = Rows[i]["USER_ID"].ToString();
             Cusername[i].User_name = Rows[i]["USER_NAME"].ToString();
             cboSetionName.Items.Add(Cusername[i]);
         }
         //cboSetionName.DataSource = ds.Tables[0].DefaultView;
         cboSetionName.ValueMember   = "USER_ID";
         cboSetionName.DisplayMember = "USER_NAME";
     }
 }
 /// <summary>
 /// 授权
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnImpower_Click(object sender, EventArgs e)
 {
     if (cboSetionName.SelectedItem != null)
     {
         string       bid;
         string       name;
         ListViewItem lst  = new ListViewItem();
         Class_User   temp = (Class_User)cboSetionName.SelectedItem;
         bid      = temp.User_id.ToString();
         name     = temp.User_name.ToString();
         lst.Tag  = bid;
         lst.Text = name;
         if (!isExist(name))
         {
             lstSetionName.Items.Add(lst);
         }
         else
         {
             App.Msg("你已经给这个人授权了!");
         }
     }
     else
     {
         App.Msg("选中您要授权的人");
     }
 }
Example #3
0
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="user"></param>
        private void GetUserInfo(Class_User user)
        {
            Class_Account account = trvAccount.SelectedNode.Tag as Class_Account;
            // 查询用户信息
            string sql_userInfo = "select c.account_name,a.user_id,a.user_name," +
                                "a.gender_code,(select name from t_data_code bb where a.U_Position=bb.id) 职务," +
                                "(select name from t_data_code cc where a.u_tech_post=cc.id) 职称," +
                                "(select section_name from t_sectioninfo dd where a.section_id=dd.sid) 科室," +
                                "(select sick_area_name from t_sickareainfo ee where a.sickarea_id=ee.said) 病区," +
                                "to_char(a.in_time,'yyyy-MM-dd HH24:mi:ss') 入职时间 from t_userinfo a inner join " +
                                "t_account_user b on a.user_id=b.user_id " +
                                "inner join t_account c on b.account_id=c.account_id where c.account_id='" + account.Account_id + "'";
            DataSet ds_userInfo = App.GetDataSet(sql_userInfo);

            if (ds_userInfo != null)
            {
                DataTable dt = ds_userInfo.Tables[0];
                user.User_id = dt.Rows[0]["user_id"].ToString();
                user.User_name = dt.Rows[0]["user_name"].ToString();
                user.U_gender_code = dt.Rows[0]["gender_code"].ToString();
                user.U_tech_post_name = dt.Rows[0]["职称"].ToString();
                user.U_position_name = dt.Rows[0]["职务"].ToString();
                user.Section = new Class_Sections();
                user.Section.Section_Name = dt.Rows[0]["科室"].ToString();
                user.Sickarea_id = dt.Rows[0]["病区"].ToString();
                user.In_time = Convert.ToDateTime(dt.Rows[0]["入职时间"]);
            }
        }
 /// <summary>
 /// 根据科室得到属于这个科室医生
 /// </summary>
 private void Section_username()
 {
     cboSetionName.Items.Clear();
     //string sql = "select u.user_id,u.user_name,u.section_id,t.section_name from t_userinfo u  " +
     //               @" inner join t_sectioninfo t on t.sid=u.section_id where t.ISBELONGTOBIGSECTION='N' and t.section_name='" + lblSetionName.Text + "'";
     //section_name='" + lblSetionName.Text + "'
     //DataSet ds = App.GetDataSet(sql);
     DataRow[] Rows = DsData.Tables["Sections_Peoples"].Select(" section_id='" + Id + "' and  ISBELONGTOBIGSECTION='N' and role_type='D' ");
     if (Rows != null)
     {
         Cuser = new Class_User[Rows.Length];
         for (int i = 0; i < Rows.Length; i++)
         {
             Cuser[i]           = new Class_User();
             Cuser[i].User_id   = Rows[i]["USER_ID"].ToString();
             Cuser[i].User_name = Rows[i]["USER_NAME"].ToString();
             cboSetionName.Items.Add(Cuser[i]);
         }
         //cboSetionName.DataSource = ds.Tables[0].DefaultView;
         cboSetionName.ValueMember   = "USER_ID";
         cboSetionName.DisplayMember = "USER_NAME";
         //cboSetionName.SelectedIndex = 0;
     }
     //cboSetionName.SelectedIndex = 0;
 }
Example #5
0
        /// <summary>
        /// 根据医务科主任和副主任角色查询匹配的医生
        /// </summary>
        private void Section_username()
        {
            cboMedical_Username.Items.Clear();

            /* string sql = @"select u.user_id,u.user_name,u.section_id,r.role_id,r.role_name from t_userinfo u " +
             *           @"inner join t_account_user a on a.user_id=u.user_id " +
             *          @"inner join t_account tot on tot.account_id=a.account_id " +
             *          @" inner join t_acc_role tac on tac.account_id=tot.account_id " +
             *          @"inner join t_role r on r.role_id=tac.role_id " +
             *          @"where r.role_type='Y'";*/
            string sql = MEdi_sql;

            DataSet ds = App.GetDataSet(sql);

            if (ds != null)
            {
                Cuser = new Class_User[ds.Tables[0].Rows.Count];
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    Cuser[i]           = new Class_User();
                    Cuser[i].User_id   = ds.Tables[0].Rows[i]["USER_ID"].ToString();
                    Cuser[i].User_name = ds.Tables[0].Rows[i]["USER_NAME"].ToString();
                    cboMedical_Username.Items.Add(Cuser[i]);
                }
                cboMedical_Username.ValueMember   = "USER_ID";
                cboMedical_Username.DisplayMember = "USER_NAME";
            }
        }
Example #6
0
        //根据医务科人名进行查询
        private void SectionChanged()
        {
            cboMedical_Username.Items.Clear();
            string sql1 = "";

            if (txtBox.Text.Trim() != "")
            {
                sql1 = MEdi_sql + " and u.user_name like '%" + txtBox.Text.Trim() + "%'";
            }
            DataSet ds = new DataSet();

            ds = App.GetDataSet(sql1);
            if (ds != null)
            {
                Cusername = new Class_User[ds.Tables[0].Rows.Count];
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    Cusername[i]           = new Class_User();
                    Cusername[i].User_id   = ds.Tables[0].Rows[i]["USER_ID"].ToString();
                    Cusername[i].User_name = ds.Tables[0].Rows[i]["USER_NAME"].ToString();
                    cboMedical_Username.Items.Add(Cusername[i]);
                }
                cboMedical_Username.ValueMember   = "USER_ID";
                cboMedical_Username.DisplayMember = "USER_NAME";
            }
        }
Example #7
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Class_User user = new Class_User();

            user.User_num  = this.txtSEC_DIRE_NAME.Text;
            user.User_name = this.labUserName.Text;
            user.User_id   = this.labID.Text;

            if (!string.IsNullOrEmpty(user.User_num) && !string.IsNullOrEmpty(user.User_name))
            {
                Class_User temp = new Class_User();
                for (int i = 0; i < lvOwernRoles.Items.Count; i++)
                {
                    temp = (Class_User)lvOwernRoles.Items[i].Tag;

                    if (temp.User_id == user.User_id)
                    {
                        App.Msg("此用户已经存在!");
                        return;
                    }
                }

                ListViewItem tempitem = new ListViewItem();
                tempitem.Tag         = user;
                tempitem.Text        = user.User_num;
                tempitem.ImageIndex  = 0;
                tempitem.IndentCount = 0;
                lvOwernRoles.Items.Add(tempitem);
            }
        }
Example #8
0
        /// <summary>
        /// 实例化查询用户信息
        /// </summary>
        /// <returns></returns>
        private Class_User[] GetDirectionary(string pat_id)
        {
            string  sql    = string.Format(@"select u.user_id,u.user_num,u.user_name from t_super_user s
inner join t_userinfo u on u.user_id = s.user_id
where patient_id = {0}", pat_id);
            DataSet tempds = App.GetDataSet(sql);

            if (tempds != null)
            {
                if (tempds.Tables[0].Rows.Count > 0)
                {
                    Class_User[] Directionary = new Class_User[tempds.Tables[0].Rows.Count];
                    for (int i = 0; i < tempds.Tables[0].Rows.Count; i++)
                    {
                        Directionary[i]           = new Class_User();
                        Directionary[i].User_id   = tempds.Tables[0].Rows[i]["user_id"].ToString();
                        Directionary[i].User_num  = tempds.Tables[0].Rows[i]["user_num"].ToString();
                        Directionary[i].User_name = tempds.Tables[0].Rows[i]["user_name"].ToString();
                    }
                    return(Directionary);
                }
                else
                {
                    return(null);
                }
            }
            else
            {
                return(null);
            }
        }
Example #9
0
        // GET: User/Create
        public IActionResult Create(int?_CompanyId)
        {
            if (_CompanyId == null)
            {
                _CompanyId = -1;
            }

            Class_User _User = new Class_User
            {
                Id           = 0,
                StatusId     = UserStatus.Ativo,
                CompanyId    = (int)_CompanyId,
                TypeAccessId = UserTypeAccess.User,
                Password     = "******"
            };

            var _CompanyLIST = from s in _context.Class_Company
                               where s.StatusId == CompanyStatus.Ativo
                               orderby s.Name
                               select new { s.Id, s.Name };

            ViewBag.UserCompany_LIST   = new SelectList(_CompanyLIST, "Id", "Name");
            ViewBag.UserTypeAcess_LIST = new SelectList(Enum.GetValues(typeof(UserTypeAccess)).Cast <UserTypeAccess>().ToList());
            return(View(_User));
        }
Example #10
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,StatusId,CompanyId,TypeAccessId,Name,Email,Phone,UserName,Password")] Class_User _User)
        {
            if (id != _User.Id)
            {
                return(RedirectToAction(nameof(Error), new { _Message = "Id não é o mesmo!" }));
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _User.StatusId = UserStatus.Ativo;
                    _User.Email    = _User.Email.ToLower();
                    _User.UserName = _User.UserName.ToUpper();

                    var _Find = await _context.Class_User.FirstOrDefaultAsync(m => m.UserName == _User.UserName && m.Id != _User.Id);

                    if (_Find != null)
                    {
                        return(RedirectToAction(nameof(Error), new { _Message = "(UserName) já está cadastrado para " + _Find.Name }));
                    }

                    if (_User.CompanyId != -1 && _User.TypeAccessId == UserTypeAccess.Master)
                    {
                        _User.TypeAccessId = UserTypeAccess.Admin;
                    }
                    else if (_User.CompanyId == -1 && _User.TypeAccessId != UserTypeAccess.Master)
                    {
                        _User.TypeAccessId = UserTypeAccess.Master;
                    }

                    _context.Update(_User);
                    await _context.SaveChangesAsync();
                }
                catch (ApplicationException e)
                {
                    return(RedirectToAction(nameof(Error), new { _Message = e.Message }));
                }
                return(RedirectToAction(nameof(Index)));
            }

            var _CompanyLIST = from s in _context.Class_Company
                               where s.StatusId == CompanyStatus.Ativo
                               orderby s.Name
                               select new { s.Id, s.Name };

            ViewBag.UserCompany_LIST   = new SelectList(_CompanyLIST, "Id", "Name");
            ViewBag.UserTypeAcess_LIST = new SelectList(Enum.GetValues(typeof(UserTypeAccess)).Cast <UserTypeAccess>().ToList());
            return(View(_User));
        }
Example #11
0
 private void 账号管理ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (index >= 0)
     {
         Class_User user = new Class_User();
         user.User_id     = ID;
         user.User_name   = txtName.Text;
         user.User_num    = txtNumber.Text;
         user.Accounttype = accounttype;
         App.frmAccountSetByUser(user);
     }
     else
     {
         App.Msg("您还没有选中要操作的用户");
     }
 }
Example #12
0
        private Class_User GetUserByAccot(string user_Number)
        {
            Class_User userInfo = new Class_User();

            string sql = "select * from " + tableSpace + "t_userinfo a inner join " + tableSpace + "t_account_user b on a.User_Id=b.user_id " +
                         " where b.account_id in (select ACCOUNT_ID from " + tableSpace + "T_ACCOUNT where " +
                         " ACCOUNT_NAME='" + user_Number + "')";

            /*
             * 获取当前帐号所对应的用户信息
             */
            DataSet ds = App.GetDataSet(sql);

            if (ds.Tables[0] != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    // App.UserAccount.UserInfo = new Class_User();

                    userInfo.User_id         = ds.Tables[0].Rows[0]["USER_ID"].ToString();
                    userInfo.User_name       = ds.Tables[0].Rows[0]["USER_NAME"].ToString();
                    userInfo.U_gender_code   = ds.Tables[0].Rows[0]["Gender_Code"].ToString();
                    userInfo.Birth_date      = Convert.ToDateTime(ds.Tables[0].Rows[0]["Birthday"].ToString());
                    userInfo.U_tech_post     = ds.Tables[0].Rows[0]["U_TECH_POST"].ToString();
                    userInfo.U_seniority     = ds.Tables[0].Rows[0]["U_SENIORITY"].ToString();
                    userInfo.In_time         = Convert.ToDateTime(ds.Tables[0].Rows[0]["IN_TIME"].ToString());
                    userInfo.U_position      = ds.Tables[0].Rows[0]["U_POSITION"].ToString();
                    userInfo.U_recipe_power  = ds.Tables[0].Rows[0]["U_RECIPE_POWER"].ToString();
                    userInfo.Section_id      = ds.Tables[0].Rows[0]["SECTION_ID"].ToString();
                    userInfo.Sickarea_id     = ds.Tables[0].Rows[0]["SICKAREA_ID"].ToString();
                    userInfo.Phone           = ds.Tables[0].Rows[0]["PHONE"].ToString();
                    userInfo.Mobile_phone    = ds.Tables[0].Rows[0]["MOBILE_PHONE"].ToString();
                    userInfo.Email           = ds.Tables[0].Rows[0]["EMAIL"].ToString();
                    userInfo.Enable_flag     = ds.Tables[0].Rows[0]["Enable"].ToString();
                    userInfo.Profession_card = ds.Tables[0].Rows[0]["PROFESSION_CARD"].ToString();
                    userInfo.Prof_card_name  = ds.Tables[0].Rows[0]["PROF_CARD_NAME"].ToString();
                    userInfo.Pass_time       = Convert.ToDateTime(ds.Tables[0].Rows[0]["PASS_TIME"].ToString());
                    userInfo.Receive_time    = Convert.ToDateTime(ds.Tables[0].Rows[0]["RECEIVE_TIME"].ToString());
                    userInfo.Register_time   = Convert.ToDateTime(ds.Tables[0].Rows[0]["REGISTER_TIME"].ToString());
                }
                else
                {
                    App.MsgErr("该帐号当前没有任何用户信息,请先给帐号设置用户信息!");
                }
            }
            return(userInfo);
        }
Example #13
0
        //根据职务(副院长)得到属于副院长的名字
        private void Section_username()
        {
            cboSubdcanal.Items.Clear();
            string  sql = Subd_sql;
            DataSet ds  = App.GetDataSet(sql);

            if (ds != null)
            {
                Cuser = new Class_User[ds.Tables[0].Rows.Count];
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    Cuser[i]           = new Class_User();
                    Cuser[i].User_id   = ds.Tables[0].Rows[i]["USER_ID"].ToString();
                    Cuser[i].User_name = ds.Tables[0].Rows[i]["USER_NAME"].ToString();
                    cboSubdcanal.Items.Add(Cuser[i]);
                }

                cboSubdcanal.ValueMember   = "USER_ID";
                cboSubdcanal.DisplayMember = "USER_NAME";
            }
        }
Example #14
0
        public void Populated()
        {
            //Company
            if (!_RCAContext.Class_Company.Any())
            {
                Class_Company _Company = new Class_Company
                {
                    Id       = -1,
                    StatusId = CompanyStatus.Ativo,

                    Name = "Acesso GERAL",
                    CNPJ = "000.000.000/0000-00",
                    Site = "www.Pousada.com.br",

                    ContactName = "Leonardo Paraiso",
                    Phone1      = "(031) 97129-2686",
                    Phone2      = "",
                    Email       = "*****@*****.**",

                    PostalCode = "00000-000",
                    Address    = "Endereço",
                    Complement = ", Complemento",
                    City       = "Cidade",
                    State      = "UF",
                    Country    = CompanyCountry.Brasil.ToString()
                };
                _RCAContext.Class_Company.Add(_Company);

                _Company = new Class_Company
                {
                    Id       = 1,
                    StatusId = CompanyStatus.Ativo,

                    Name = "Pousada Rancho Coração Aberto",
                    CNPJ = "031.736.902/0001-14",
                    Site = "www.Pousada.com.br",

                    ContactName = "Leonardo Paraiso",
                    Phone1      = "(031) 97129-2686",
                    Phone2      = "",
                    Email       = "*****@*****.**",

                    PostalCode = "37930-000",
                    Address    = "Estrada Capitólio",
                    Complement = "Dique Km 5, s/n - Margem do Lago",
                    City       = "Capitólio",
                    State      = "MG",
                    Country    = CompanyCountry.Brasil.ToString()
                };
                _RCAContext.Class_Company.Add(_Company);

                //Save
                _RCAContext.SaveChanges();
            }



            //User
            if (!_RCAContext.Class_User.Any())
            {
                Class_User _User = new Class_User
                {
                    StatusId     = UserStatus.Ativo,
                    CompanyId    = -1,
                    TypeAccessId = UserTypeAccess.Master,

                    Name  = "Valdemir P. Silva",
                    Email = "*****@*****.**",
                    Phone = "(11) 98278-3044",

                    UserName = "******",
                    Password = "******"
                };
                _RCAContext.Class_User.Add(_User);

                //Save
                _RCAContext.SaveChanges();
            }



            //Channel
            if (!_RCAContext.Class_Channel.Any())
            {
                //BALCAO
                var _Level = new Class_Channel
                {
                    StatusId  = ChannelStatus.Ativo,
                    CompanyId = 1,
                    TypeId    = ChannelType.BALCAO,

                    Name    = "BALCÃO",
                    Tax     = 0,
                    Percent = 0
                };
                _RCAContext.Class_Channel.Add(_Level);

                //SITE
                _Level = new Class_Channel
                {
                    StatusId  = ChannelStatus.Ativo,
                    CompanyId = 1,
                    TypeId    = ChannelType.SITE,

                    Name    = "SITE PRÓPRIO",
                    Tax     = 0,
                    Percent = 0
                };
                _RCAContext.Class_Channel.Add(_Level);

                //RESERVA
                _Level = new Class_Channel
                {
                    StatusId  = ChannelStatus.Ativo,
                    CompanyId = 1,
                    TypeId    = ChannelType.RESERVA,

                    Name    = "Booking.com",
                    Tax     = 0,
                    Percent = 3
                };
                _RCAContext.Class_Channel.Add(_Level);

                //RESERVA
                _Level = new Class_Channel
                {
                    StatusId  = ChannelStatus.Ativo,
                    CompanyId = 1,
                    TypeId    = ChannelType.RESERVA,

                    Name    = "Expedia.com",
                    Tax     = 0,
                    Percent = 4
                };
                _RCAContext.Class_Channel.Add(_Level);

                //RESERVA
                _Level = new Class_Channel
                {
                    StatusId  = ChannelStatus.Ativo,
                    CompanyId = 1,
                    TypeId    = ChannelType.RESERVA,

                    Name    = "Trivago.com",
                    Tax     = 2.5,
                    Percent = 0
                };
                _RCAContext.Class_Channel.Add(_Level);

                //Save
                _RCAContext.SaveChanges();
            }



            //GroupLevel
            if (!_RCAContext.Class_GroupLevel.Any())
            {
                //HOSPEDAGEM
                var _Level = new Class_GroupLevel
                {
                    StatusId  = GroupLevelStatus.Ativo,
                    CompanyId = 1,
                    GroupId   = GroupType.ACOMODACAO,

                    Name = "Acomodação MASTER"
                };
                _RCAContext.Class_GroupLevel.Add(_Level);
                //
                _Level = new Class_GroupLevel
                {
                    StatusId  = GroupLevelStatus.Ativo,
                    CompanyId = 1,
                    GroupId   = GroupType.ACOMODACAO,

                    Name = "Acomodação PADRÃO"
                };
                _RCAContext.Class_GroupLevel.Add(_Level);


                //ENTRETENIMENTO
                _Level = new Class_GroupLevel
                {
                    StatusId  = GroupLevelStatus.Ativo,
                    CompanyId = 1,
                    GroupId   = GroupType.ENTRETENIMENTO,

                    Name = "Passeio JEEP"
                };
                _RCAContext.Class_GroupLevel.Add(_Level);
                //
                _Level = new Class_GroupLevel
                {
                    StatusId  = GroupLevelStatus.Ativo,
                    CompanyId = 1,
                    GroupId   = GroupType.ENTRETENIMENTO,

                    Name = "Passeio LANCHA"
                };
                _RCAContext.Class_GroupLevel.Add(_Level);
                //
                _Level = new Class_GroupLevel
                {
                    StatusId  = GroupLevelStatus.Ativo,
                    CompanyId = 1,
                    GroupId   = GroupType.ENTRETENIMENTO,

                    Name = "SPA"
                };
                _RCAContext.Class_GroupLevel.Add(_Level);
                //
                _Level = new Class_GroupLevel
                {
                    StatusId  = GroupLevelStatus.Ativo,
                    CompanyId = 1,
                    GroupId   = GroupType.ENTRETENIMENTO,

                    Name = "ACESSÓRIO"
                };
                _RCAContext.Class_GroupLevel.Add(_Level);


                //CONSUMO
                _Level = new Class_GroupLevel
                {
                    StatusId  = GroupLevelStatus.Ativo,
                    CompanyId = 1,
                    GroupId   = GroupType.CONSUMO,

                    Name = "BEBIDA"
                };
                _RCAContext.Class_GroupLevel.Add(_Level);
                //
                _Level = new Class_GroupLevel
                {
                    StatusId  = GroupLevelStatus.Ativo,
                    CompanyId = 1,
                    GroupId   = GroupType.CONSUMO,

                    Name = "PORÇÃO"
                };
                _RCAContext.Class_GroupLevel.Add(_Level);
                //
                _Level = new Class_GroupLevel
                {
                    StatusId  = GroupLevelStatus.Ativo,
                    CompanyId = 1,
                    GroupId   = GroupType.CONSUMO,

                    Name = "REFEIÇÃO"
                };
                _RCAContext.Class_GroupLevel.Add(_Level);
                //
                _Level = new Class_GroupLevel
                {
                    StatusId  = GroupLevelStatus.Ativo,
                    CompanyId = 1,
                    GroupId   = GroupType.CONSUMO,

                    Name = "LOJINHA"
                };
                _RCAContext.Class_GroupLevel.Add(_Level);

                //Save
                _RCAContext.SaveChanges();
            }

            //GroupLevel
            if (!_RCAContext.Class_GroupLevelItem.Any())
            {
                //HOSPEDAGEM - MASTER
                var _GroupLevelId = _RCAContext.Class_GroupLevel.FirstOrDefault(m => m.Name == "Comodação MASTER");
                //
                var _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name         = "Sapequinha",
                    OccupantsNum = 2,
                    PCD          = GroupLevelItem_YN.Sim
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);

                //HOSPEDAGEM - PADRÃO
                _GroupLevelId = _RCAContext.Class_GroupLevel.FirstOrDefault(m => m.Name == "Comodação PADRÃO");
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name         = "Os DEZ Mandamentos do Amor",
                    OccupantsNum = 3,
                    PCD          = GroupLevelItem_YN.Nao
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name         = "Enamorados",
                    OccupantsNum = 3,
                    PCD          = GroupLevelItem_YN.Nao
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name         = "Me Apaxonei",
                    OccupantsNum = 3,
                    PCD          = GroupLevelItem_YN.Nao
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name         = "Anjo Protetor",
                    OccupantsNum = 3,
                    PCD          = GroupLevelItem_YN.Sim
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name         = "A Carta",
                    OccupantsNum = 4,
                    PCD          = GroupLevelItem_YN.Nao
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name         = "Eu Amo Você",
                    OccupantsNum = 4,
                    PCD          = GroupLevelItem_YN.Nao
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);


                //ENTRETENIMENTO - JEEP
                _GroupLevelId = _RCAContext.Class_GroupLevel.FirstOrDefault(m => m.Name == "Passeio JEEP");
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "JEEP 4X4 - EXCLUSIVO",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "JEEP 4X4 - 2 pessoas",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "JEEP 4X4 - 4 pessoas",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);


                //ENTRETENIMENTO - LANCHA
                _GroupLevelId = _RCAContext.Class_GroupLevel.FirstOrDefault(m => m.Name == "Passeio LANCHA");
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "LANCHA 19p - EXCLUSIVO",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "LANCHA 19p - 2 pessoas",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "LANCHA 19p - 4 pessoas",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "LANCHA 19p - 8 pessoas",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);


                //ENTRETENIMENTO - SPA
                _GroupLevelId = _RCAContext.Class_GroupLevel.FirstOrDefault(m => m.Name == "SPA");
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Massagem INDIVIDUAL",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Sauna INDIVIDUAL",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Yoga INDIVIDUAL",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);


                //ENTRETENIMENTO - ACESSÓRIO
                _GroupLevelId = _RCAContext.Class_GroupLevel.FirstOrDefault(m => m.Name == "ACESSÓRIO");
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Proteção a prova dágua p/celular",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Mascara de mergulho",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Boné masculino",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Chapéu feminimo",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);


                //CONSUMO - BEBIDA
                _GroupLevelId = _RCAContext.Class_GroupLevel.FirstOrDefault(m => m.Name == "BEBIDA");
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Água copo 300ml",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Água garrafa 500ml",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Refrigerante lata 300ml",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Suco natural jarra 500ml",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);


                //CONSUMO - PORCAO
                _GroupLevelId = _RCAContext.Class_GroupLevel.FirstOrDefault(m => m.Name == "PORÇÃO");
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Porção de batata frita",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Porção de linguiça",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);


                //CONSUMO - REFEICAO
                _GroupLevelId = _RCAContext.Class_GroupLevel.FirstOrDefault(m => m.Name == "REFEIÇÃO");
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Prato do dia",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Prato Macarronada",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);


                //CONSUMO - LOJINHA
                _GroupLevelId = _RCAContext.Class_GroupLevel.FirstOrDefault(m => m.Name == "LOJINHA");
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Camiseta (P/M/G)",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);
                //
                _Level = new Class_GroupLevelItem
                {
                    StatusId     = GroupLevelItemStatus.Ativo,
                    GroupLevelId = _GroupLevelId.Id,

                    Name = "Camiseta (PLUS SIZE)",
                };
                _RCAContext.Class_GroupLevelItem.Add(_Level);


                //Save
                _RCAContext.SaveChanges();
            }
        }
 /// <summary>
 /// 实例化查询用户结果
 /// </summary>
 /// <param Name="tempds"></param>
 /// <returns></returns>
 private Class_User[] GetDirectionary(DataRow[] Rows)
 {
     if (Rows != null)
     {
         if (Rows.Length > 0)
         {
             Class_User[] Directionary = new Class_User[Rows.Length];
             for (int i = 0; i < Rows.Length; i++)
             {
                 Directionary[i]               = new Class_User();
                 Directionary[i].User_id       = Convert.ToInt32(Rows[i]["USER_ID"]).ToString();
                 Directionary[i].User_name     = Rows[i]["USER_NAME"].ToString();
                 Directionary[i].U_gender_code = Rows[i]["GENDER_CODE"].ToString();
                 Directionary[i].Birth_date    = DateTime.Parse(Rows[i]["BIRTHDAY"].ToString());
                 Directionary[i].U_tech_post   = Rows[i]["U_TECH_POST"].ToString();
                 Directionary[i].U_seniority   = Rows[i]["U_SENIORITY"].ToString();
                 Directionary[i].In_time       = DateTime.Parse(Rows[i]["IN_TIME"].ToString());
                 if (Rows[i]["U_POSITION"].ToString().Trim() != "")
                 {
                     Directionary[i].U_position = Rows[i]["U_POSITION"].ToString();
                 }
                 Directionary[i].U_recipe_power = Rows[i]["U_RECIPE_POWER"].ToString();
                 Directionary[i].Section_id     = Rows[i]["SECTION_ID"].ToString();
                 Directionary[i].Sickarea_id    = Rows[i]["SICKAREA_ID"].ToString();
                 if (Rows[i]["PHONE"].ToString().Trim() != "")
                 {
                     Directionary[i].Phone = Rows[i]["PHONE"].ToString();
                 }
                 if (Rows[i]["EMAIL"].ToString().Trim() != "")
                 {
                     Directionary[i].Email = Rows[i]["EMAIL"].ToString();
                 }
                 if (Rows[i]["MOBILE_PHONE"].ToString().Trim() != "")
                 {
                     Directionary[i].Mobile_phone = Rows[i]["MOBILE_PHONE"].ToString();
                 }
                 Directionary[i].Enable_flag = Rows[i]["ENABLE"].ToString();
                 if (Rows[i]["PROFESSION_CARD"].ToString().Trim() != "")
                 {
                     Directionary[i].Profession_card = Rows[i]["PROFESSION_CARD"].ToString();
                 }
                 if (Rows[i]["PROF_CARD_NAME"].ToString().Trim() != "")
                 {
                     Directionary[i].Prof_card_name = Rows[i]["PROF_CARD_NAME"].ToString();
                 }
                 Directionary[i].Pass_time     = DateTime.Parse(Rows[i]["PASS_TIME"].ToString());
                 Directionary[i].Receive_time  = DateTime.Parse(Rows[i]["RECEIVE_TIME"].ToString());
                 Directionary[i].Register_time = DateTime.Parse(Rows[i]["REGISTER_TIME"].ToString());
             }
             return(Directionary);
         }
         else
         {
             return(null);
         }
     }
     else
     {
         return(null);
     }
 }