private void Bind_DropDown_Controls() { classSection = new ClassSection(); listSection = classSection.GetSectionDetails(); classType = new ClassType(); listClass = classType.GetClassDetails(); if (listSection != null) { listSection.Add(new ClassSectionModel { ClassSectionID = 0, SectionName = "Select" }); ddlSection.DataSource = listSection.OrderBy(x => x.ClassSectionID).ToList(); ddlSection.DisplayMember = "SectionName"; ddlSection.ValueMember = "ClassSectionID"; } if (listClass != null) { listClass.Add(new ClassTypeModel { ClassID = 0, ClassName = "Select", Active = true }); ddlClass.DataSource = listClass.OrderBy(x => x.ClassID).ToList(); ddlClass.DisplayMember = "ClassName"; ddlClass.ValueMember = "ClassID"; } }
private void BindConrols() { _classType = new ClassType(); _classSection = new ClassSection(); _listClassType = _classType.GetClassDetails(); _listSectionType = _classSection.GetSectionDetails(); if (_listClassType == null) { _listClassType = new List <ClassTypeModel>(); } _listClassType.Add(new ClassTypeModel { ClassID = 0, ClassName = "Select" }); ddlClass.DataSource = _listClassType.OrderBy(x => x.ClassID).ToList(); ddlClass.DisplayMember = "ClassName"; ddlClass.ValueMember = "ClassID"; if (_listSectionType == null) { _listSectionType = new List <ClassSectionModel>(); } _listSectionType.Add(new ClassSectionModel { ClassSectionID = 0, SectionName = "Select" }); ddlSection.DataSource = _listSectionType.OrderBy(x => x.ClassSectionID).ToList(); ddlSection.DisplayMember = "SectionName"; ddlSection.ValueMember = "ClassSectionID"; }
private void BindDropDownControls() { fineSettings = new FineSettings(); listFineType = fineSettings.GetFineType(); classSection = new ClassSection(); listSection = classSection.GetSectionDetails(); classType = new ClassType(); listClass = classType.GetClassDetails(); if (listSection != null) { listSection.Add(new ClassSectionModel { ClassSectionID = 0, SectionName = "Select" }); ddlCurrentSection.DataSource = listSection.OrderBy(x => x.ClassSectionID).ToList(); ddlCurrentSection.DisplayMember = "SectionName"; ddlCurrentSection.ValueMember = "ClassSectionID"; } if (listFineType != null) { listFineType.Add(new FineTypeModel { FineTypeID = 0, FineType = "Select" }); ddlFeeType.DataSource = listFineType.OrderBy(x => x.FineTypeID).ToList(); ddlFeeType.DisplayMember = "FineType"; ddlFeeType.ValueMember = "FineTypeID"; } if (listClass != null) { listClass.Add(new ClassTypeModel { ClassID = 0, ClassName = "Select", Active = true }); ddlCurrentClass.DataSource = listClass.OrderBy(x => x.ClassID).ToList(); ddlCurrentClass.DisplayMember = "ClassName"; ddlCurrentClass.ValueMember = "ClassID"; } datePickerReport.Format = DateTimePickerFormat.Custom; datePickerReport.Value = DateTime.Now; datePickerReport.CustomFormat = "dd.MM.yyyy"; }
private void BindClassTypeDropDownList() { _classType = new ClassType(); List <ClassTypeModel> _listClassTypeList = _classType.GetClassDetails(); if (_listClassTypeList != null) { _listClassTypeList.Add(new ClassTypeModel { ClassID = null, ClassName = "Select", Active = true }); _listClassTypeList.Add(new ClassTypeModel { ClassID = 0, ClassName = "All Class", Active = true }); ddlClass.DataSource = _listClassTypeList.OrderBy(x => x.ClassID).ToList(); ddlClass.DisplayMember = "ClassName"; ddlClass.ValueMember = "ClassID"; } }
private void BindControls() { _classType = new ClassType(); _listClassType = _classType.GetClassDetails(); if (_listClassType == null) { _listClassType = new List <ClassTypeModel>(); } _listClassType.Add(new ClassTypeModel { ClassID = 0, ClassName = "Select" }); ddlClass.DataSource = _listClassType.OrderBy(x => x.ClassID).ToList(); ddlClass.DisplayMember = "ClassName"; ddlClass.ValueMember = "ClassID"; datePickerReport.Format = DateTimePickerFormat.Custom; datePickerReport.Value = DateTime.Now; datePickerReport.CustomFormat = " dd.MM.yyyy"; }