private void PopulateDonar()
 {
     objWebService = new BudgetDonarService();
     objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBudgetDonar();
     dtPopulateDonar = objWebService.PopulateAllDonars(Session["LanguageSetting"].ToString());
     if (dtPopulateDonar != null && dtPopulateDonar.Rows.Count > 0)
     {
         ddlDonar.DataSource     = dtPopulateDonar;
         ddlDonar.DataTextField  = "DONAR_NAME";
         ddlDonar.DataValueField = "DONAR_ID";
         ddlDonar.DataBind();
         ddlDonar.Items.Insert(0, "--Choose Donar--");
     }
 }
 private void BindListView()
 {
     objWebService = new BudgetDonarService();
     objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBudgetDonar();
     dtListView = objWebService.PopulateAllDonars(Session["LanguageSetting"].ToString());
     if (dtListView != null && dtListView.Rows.Count > 0)
     {
         //  lblBudgetDonars.Visible = true;
         lvDonar.DataSource = dtListView;
         lvDonar.DataBind();
     }
     else
     {
         // lblBudgetDonars.Visible = true;
     }
 }
Exemple #3
0
        protected void rptAayojanaBadfad_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
            {
                DropDownList       dll           = (DropDownList)e.Item.FindControl("ddlShrot");
                DataTable          DtShrot       = null;
                BudgetDonarService objWebService = new BudgetDonarService();
                objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBudgetDonar();
                DtShrot = objWebService.PopulateAllDonars(Session["LanguageSetting"].ToString());
                if (DtShrot != null && DtShrot.Rows.Count > 0)
                {
                    dll.DataSource     = DtShrot;
                    dll.DataTextField  = "DONAR_NAME";
                    dll.DataValueField = "DONAR_ID";
                    dll.DataBind();
                    dll.Items.Insert(0, "--छान्नुहोस्--");
                }

                DropDownList ddlBhuktaniPrakar = (DropDownList)e.Item.FindControl("ddlBhuktaniPrakar");
                ComProjectBO obj = null;
                obj      = new ComProjectBO();
                obj.Lang = Session["LanguageSetting"].ToString();
                DataTable DtBhuktaniPrakar = null;
                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                DtBhuktaniPrakar    = wbs.PopulateBhuktaniPrakar(obj);
                if (DtBhuktaniPrakar != null && DtBhuktaniPrakar.Rows.Count > 0)
                {
                    ddlBhuktaniPrakar.DataSource     = DtBhuktaniPrakar;
                    ddlBhuktaniPrakar.DataTextField  = "PAYMENT_TYPE_NAME";
                    ddlBhuktaniPrakar.DataValueField = "PAYMENT_TYPE_ID";
                    ddlBhuktaniPrakar.DataBind();
                    ddlBhuktaniPrakar.Items.Insert(0, "--छान्नुहोस्--");
                }

                DropDownList ddlDonar = new DropDownList();
                ddlDonar = (DropDownList)e.Item.FindControl("ddlShrot");
                DropDownList ddlPaymentType = new DropDownList();
                ddlPaymentType               = (DropDownList)e.Item.FindControl("ddlBhuktaniPrakar");
                ddlDonar.SelectedValue       = dtA.Rows[e.Item.ItemIndex]["DONAR_ID"].ToString();
                ddlPaymentType.SelectedValue = dtA.Rows[e.Item.ItemIndex]["PAYMENT_TYPE_ID"].ToString();
            }
        }