public ActionResult Create()
 {
     ViewBag.Id           = new SelectList(AIB.GetAll(), "Id", "Username");
     ViewBag.DepartmentId = new SelectList(DB1.GetAll(), "ID", "DepartmentName");
     ViewBag.TitleId      = new SelectList(TB.GetAll(), "ID", "TitleName");
     return(View());
 }
示例#2
0
        // GET: Manager
        public ActionResult Index()
        {
            GenderBusiness gb = new GenderBusiness();
            TitleBusiness  tb = new TitleBusiness();
            GenderTitle    m  = new GenderTitle();

            m.Genders = gb.GetAll().ToList();
            m.Titles  = tb.GetAll().ToList();
            return(View(m));
        }
        private void EmployeeEditForm_Load(object sender, EventArgs e)
        {
            TitleBusiness employeeTitle = new TitleBusiness();

            List <Title> titleList = employeeTitle.GetAll();

            cmbTitle.DataSource    = null;
            cmbTitle.DataSource    = titleList;
            cmbTitle.DisplayMember = "TitleName";
            cmbTitle.ValueMember   = "ID";
        }
示例#4
0
        private void TitleListForm_Load(object sender, EventArgs e)
        {
            _titleBusiness = new TitleBusiness();
            List <Title> titleList = _titleBusiness.GetAll();
            var          list      = (from t in titleList
                                      select new
            {
                ID = t.ID,
                TitleName = t.TitleName
            }
                                      ).ToList();

            dgvTitleList.DataSource = null;
            dgvTitleList.DataSource = list;
        }
        private void StaffSettingForm1_Load(object sender, EventArgs e)
        {
            linkLabel1.Visible        = linkLabel2.Visible = false;
            dtWorkLeavingDate.Enabled = false;

            txtId.Visible = false;

            dgvStaffs.DataSource = sb.Staffs();

            cmbTitle.BindCombobox <Title>("TitleName", "TitleId", tb.GetAll());
            cmbTitle.DataSource   = tb.GetTitle();
            txtTcNumber.MaxLength = 11;

            cmbQuestion.Items.Add("En Sevdiğiniz Arkadaşınızın İsmi?");
            cmbQuestion.Items.Add("Hayalinizdeki İş?");
            cmbQuestion.Items.Add("İlkokul Öğretmeninizin Adı?");
            cmbQuestion.Items.Add("İlk Arabanızın Markası?");
            cmbQuestion.Items.Add("Annenizin Kızlık Soyadı?");
            Temizle();
        }
 public ActionResult Index()
 {
     return(View(TB.GetAll()));
 }