private void populateSubSector(int i)
        {
            objWebService = new SectorService();
            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector();
            ComSubSector objComSubSector = new ComSubSector();

            objComSubSector.SubSectorId = i;
            DataTable dtPopulateSubSector = objWebService.PopulateAllSubSectors(objComSubSector);

            Session["dtPopulateSubSector"] = dtPopulateSubSector;
            if (dtPopulateSubSector != null && dtPopulateSubSector.Rows.Count > 0)
            {
                txtSubSectorEngName.Text = dtPopulateSubSector.Rows[0]["activity_sub_sector_eng_name"].ToString();
                txtSubSectorNepName.Text = dtPopulateSubSector.Rows[0]["activity_sub_sector_nep_name"].ToString();
                txtSubSectorCode.Text    = dtPopulateSubSector.Rows[0]["activity_sub_sector_code"].ToString();
                ddlSector.SelectedValue  = dtPopulateSubSector.Rows[0]["activity_sector_id"].ToString();
                if (Convert.ToInt16(dtPopulateSubSector.Rows[0]["ISENABLE"]) == 1)
                {
                    chkIsEnable.Checked = true;
                }
                else
                {
                    chkIsEnable.Checked = false;
                }
            }
        }
Пример #2
0
 private void BindListView()
 {
     objWebService   = new SectorService();
     objComSubSector = new ComSubSector();
     objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector();
     objComSubSector.Lang          = Session["LanguageSetting"].ToString();
     dtListView = objWebService.PopulateAllSubSectors(objComSubSector);
     if (dtListView != null && dtListView.Rows.Count > 0)
     {
         lvSubSector.DataSource = dtListView;
         lvSubSector.DataBind();
     }
     else
     {
     }
 }
Пример #3
0
        private void populateSubSector()
        {
            SectorService objWebService = new SectorService();

            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector();
            DataTable    dtPopulateSubSector = null;
            string       selectedDataText    = string.Empty;
            ComSubSector objComSubSector     = new ComSubSector();

            dtPopulateSubSector = objWebService.PopulateAllSubSectors(objComSubSector);
            if (dtPopulateSubSector != null && dtPopulateSubSector.Rows.Count > 0)
            {
                selectedDataText            = Session["LanguageSetting"].ToString() == "Nepali" ? "activity_sub_sector_nep_name" : "activity_sub_sector_eng_name";
                ddlSubSector.DataSource     = dtPopulateSubSector;
                ddlSubSector.DataTextField  = selectedDataText;
                ddlSubSector.DataValueField = "activity_sub_sector_id";
                ddlSubSector.DataBind();
                ddlSubSector.Items.Insert(0, "-- छान्नुहोस्--");
            }
        }