Beispiel #1
0
        protected void lsv_SetupPage_ItemCreated(object sender, ListViewItemEventArgs e)
        {
            try
            {
                DropDownList ddlDivisionName = e.Item.FindControl("ddlDivisionName") as DropDownList;
                DropDownList ddlDistrictName = e.Item.FindControl("ddlDistrictName") as DropDownList;

                if (ddlDivisionName != null)
                {
                    ScriptManager.GetCurrent(Page).RegisterAsyncPostBackControl(ddlDivisionName);
                }
                if (ddlDistrictName != null)
                {
                    ScriptManager.GetCurrent(Page).RegisterAsyncPostBackControl(ddlDistrictName);
                }

                if (ddlDivisionName != null)
                {
                    LoadComboRefGrid(ref ddlDivisionName, ALRD_DivisionInfoService.GetService().GetAll(new ALRD_DivisionInfoEntity()).ToList(), CommonFunctions.GetPropertyName((ALRD_DivisionInfoEntity x) => x.DESCRIPT), CommonFunctions.GetPropertyName((ALRD_DivisionInfoEntity x) => x.COMPID));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 private void LoadCombo()
 {
     try
     {
         LoadComboRef(ref ddlDivision, ALRD_DivisionInfoService.GetService().GetAll(new ALRD_DivisionInfoEntity()).ToList(), CommonFunctions.GetPropertyName((ALRD_DivisionInfoEntity x) => x.DESCRIPT), CommonFunctions.GetPropertyName((ALRD_DivisionInfoEntity x) => x.COMPID));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        private void LoadCombo()
        {
            try
            {
                LoadComboRef(ref ddlDivision, ALRD_DivisionInfoService.GetService().GetAll(new ALRD_DivisionInfoEntity()).ToList(), CommonFunctions.GetPropertyName((ALRD_DivisionInfoEntity x) => x.DESCRIPT), CommonFunctions.GetPropertyName((ALRD_DivisionInfoEntity x) => x.COMPID));

                DateTime currentDate = DateTime.Now;
                ddlYear.SelectedValue  = currentDate.Year.ToString();
                ddlMonth.SelectedValue = currentDate.Month.ToString();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        private void LoadData()
        {
            IList <ALRD_DivisionInfoEntity> itemList = new List <ALRD_DivisionInfoEntity>();

            try
            {
                LocalDataStore = ALRD_DivisionInfoService.GetService().GetAll(new ALRD_DivisionInfoEntity()).ToList();
                if (LocalDataStore != null && LocalDataStore.Count > 0)
                {
                    this.lsv_SetupPage.DataSource = LocalDataStore;
                }
                else
                {
                    this.lsv_SetupPage.EditIndex          = -1;
                    this.lsv_SetupPage.InsertItemPosition = InsertItemPosition.FirstItem;
                    this.lsv_SetupPage.DataSource         = new List <ALRD_DivisionInfoEntity>();
                }
                this.lsv_SetupPage.DataBind();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }