private void InitData_dgv_zhlb() { //获取多个对象 ACC01Repository repository = new ACC01Repository(); dgv_zhlb.DataSource = repository.GetACC01Infos(); dgv_zhlb.ReadOnly = true; }
private void btn_Add_Click(object sender, EventArgs e) { ACC01 aCC01 = new ACC01(); aCC01.PingTai = cb_pingtai.SelectedValue.ToString(); aCC01.PingTai_BuChong = tb_pingtaibuchong.Text.ToString(); aCC01.Rid = Guid.NewGuid(); aCC01.Password = tb_password.Text.ToString(); aCC01.LogonName = tb_logonname.Text.ToString(); aCC01.Telephone = tb_telephone.Text.ToString(); aCC01.Email = tb_email.Text.ToString(); aCC01.Url = tb_url.Text.ToString(); ACC01Repository aCC01Repository = new ACC01Repository(); aCC01Repository.Add(aCC01); }