protected void btnMapBudgetDonar_Click(object sender, EventArgs e)
        {
            objComBudgetDonar = new ComBudgetDonar();
            int i = 0;

            objComBudgetDonar.BudgetDonarMapId = BudgetDonarMapId;
            objComBudgetDonar.BudgetHeadId     = ddlBudgetHead.SelectedValue.ToInt32();
            objComBudgetDonar.DonarId          = ddlDonar.SelectedValue.ToInt32();
            objComBudgetDonar.PaymentTypeId    = ddlPaymentType.SelectedValue.ToInt32();
            objComBudgetDonar.FiscalYearId     = ddlFiscalYear.SelectedValue.ToInt32();
            objComBudgetDonar.IsEnable         = (chkIsEnable.Checked) ? 1 : 0;
            objComBudgetDonar.IsLocked         = 0;
            if (BudgetDonarMapId == 0)
            {
                objComBudgetDonar.Mode = "I";
            }
            else
            {
                objComBudgetDonar.Mode = "U";
            }

            objWebService = new BudgetDonarService();
            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBudgetDonar();
            i = objWebService.AddEditMapBudgetDonar(objComBudgetDonar);
            if (i > 0)
            {
                Response.Write("<script>alert(' Budget-Donar mapped successfully!')</script>");
                Response.Redirect(Constants.ConstantAppPath + "/Modules/Budget/BudgetToLineItemMap.aspx");
            }
            else
            {
                Response.Write("<script>alert('Line Item Detail  addition failed!')</script>");
            }
        }
        protected void BtnEdit_Command(object sender, CommandEventArgs e)
        {
            int donarId = 0;

            if (e.CommandName == "edit")
            {
                donarId = int.Parse(e.CommandArgument.ToString());
                SecureQueryString str = new SecureQueryString();
                str["id"] = e.CommandArgument.ToString();
                Response.Redirect(Constants.ConstantAppPath + "/Modules/Budget/AddBudgetDonar.aspx" + str.EncryptedString, false);
            }
            else if (e.CommandName == "delete")
            {
                objWebService = new BudgetDonarService();
                donarId       = int.Parse(e.CommandArgument.ToString());
                objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBudgetDonar();
                objWebService.deleteDonar(donarId);
                Response.Redirect(Constants.ConstantAppPath + "/Modules/Budget/BudgetDonarsList.aspx");
            }
            else if (e.CommandName == "lock")
            {
                objWebService = new BudgetDonarService();
                int i = 0;
                donarId = int.Parse(e.CommandArgument.ToString());
                objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBudgetDonar();
                i = objWebService.LockBudgetDonar(donarId);
                if (i > 0)
                {
                    Response.Redirect(Constants.ConstantAppPath + "/Modules/Budget/BudgetDonarsList.aspx");
                }
                else
                {
                    Response.Write("<script>alert('Lock failed')</script>");
                }
            }
            else
            {
                objWebService = new BudgetDonarService();
                int i = 0;
                donarId = int.Parse(e.CommandArgument.ToString());
                objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBudgetDonar();
                i = objWebService.UnlockBudgetDonar(donarId);
                if (i > 0)
                {
                    Response.Redirect(Constants.ConstantAppPath + "/Modules/Budget/BudgetDonarsList.aspx");
                }
                else
                {
                    Response.Write("<script>alert('Lock failed')</script>");
                }
            }
        }
 private void PopulatePaymentType()
 {
     objWebService = new BudgetDonarService();
     objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBudgetDonar();
     dtPopulatePaymentType         = objWebService.PopulatePaymentType(Session["LanguageSetting"].ToString());
     if (dtPopulatePaymentType != null && dtPopulatePaymentType.Rows.Count > 0)
     {
         ddlPaymentType.DataSource     = dtPopulatePaymentType;
         ddlPaymentType.DataTextField  = "PAYMENT_TYPE_NAME";
         ddlPaymentType.DataValueField = "PAYMENT_TYPE_ID";
         ddlPaymentType.DataBind();
         ddlPaymentType.Items.Insert(0, "--Choose Payment Type--");
     }
 }
 private void PopulateFiscalYear()
 {
     objWebService = new BudgetDonarService();
     objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBudgetDonar();
     dtPopulateFiscalYear          = objWebService.PopulateFiscalYear(Session["LanguageSetting"].ToString());
     if (dtPopulateFiscalYear != null && dtPopulateFiscalYear.Rows.Count > 0)
     {
         ddlFiscalYear.DataSource     = dtPopulateFiscalYear;
         ddlFiscalYear.DataTextField  = "FISCAL_YEAR";
         ddlFiscalYear.DataValueField = "FISCAL_YEAR_ID";
         ddlFiscalYear.DataBind();
         ddlFiscalYear.Items.Insert(0, "--Choose Fiscal Year--");
     }
 }
 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;
     }
 }
Ejemplo n.º 6
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();
            }
        }
Ejemplo n.º 7
0
        protected void btnAddDonar_Click(object sender, EventArgs e)
        {
            int i = 0;

            objComBudgetDonar.DonarEngName = txtDonarEnglishName.Text;
            objComBudgetDonar.DonarNepName = txtDonarNepaliName.Text;
            objComBudgetDonar.DonarCode    = txtDonarCode.Text;
            objComBudgetDonar.DonarType    = ddlDonarType.SelectedValue.ToInt32();
            objComBudgetDonar.IsEnable     = (chkIsEnable.Checked) ? 1 : 0;
            objComBudgetDonar.IsLocked     = 0;
            objWebService = new BudgetDonarService();
            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBudgetDonar();
            i = objWebService.AddDonar(objComBudgetDonar, Session["donarId"].ToInt32());
            if (i > 0)
            {
                Response.Write("<script>alert('Budget Donar added successfully!')</script>");
                Response.Redirect(Constants.ConstantAppPath + "/Modules/Budget/BudgetDonarsList.aspx");
            }
            else
            {
                Response.Write("<script>alert('Budget Donar addition failed!')</script>");
            }
        }
Ejemplo n.º 8
0
        private void populateDonarDetails(int donarId)
        {
            objWebService = new BudgetDonarService();
            objWebService.AuthSoapHdValue     = ServiceAuth.ServiceAuthenticationBudgetDonar();
            Session["dtPopulateDonarDetails"] = objWebService.PopulateDonarDetails(donarId);
            DataTable dtPopulateDonarDetails = (DataTable)Session["dtPopulateDonarDetails"];

            if (dtPopulateDonarDetails != null && dtPopulateDonarDetails.Rows.Count > 0)
            {
                txtDonarEnglishName.Text   = dtPopulateDonarDetails.Rows[0]["donar_eng_name"].ToString();
                txtDonarNepaliName.Text    = dtPopulateDonarDetails.Rows[0]["donar_nep_name"].ToString();
                txtDonarCode.Text          = dtPopulateDonarDetails.Rows[0]["donar_code"].ToString();
                ddlDonarType.SelectedValue = dtPopulateDonarDetails.Rows[0]["donar_type"].ToString();
                if (dtPopulateDonarDetails.Rows[0]["ISENABLE"].ToString() == "1")
                {
                    chkIsEnable.Checked = true;
                }
                else
                {
                    chkIsEnable.Checked = false;
                }
            }
        }
 private void BudgetDonarMapDetails(int budgetDonarMapId)
 {
     objComBudgetDonar = new ComBudgetDonar();
     objComBudgetDonar.BudgetDonarMapId = budgetDonarMapId;
     objWebService = new BudgetDonarService();
     objWebService.AuthSoapHdValue   = ServiceAuth.ServiceAuthenticationBudgetDonar();
     dtPopulateBudgetDonarMapDetails = objWebService.PopulateBudgetDonarMapDetails(objComBudgetDonar);
     if (dtPopulateBudgetDonarMapDetails != null && dtPopulateBudgetDonarMapDetails.Rows.Count > 0)
     {
         ddlBudgetHead.SelectedValue  = dtPopulateBudgetDonarMapDetails.Rows[0]["BUDG_HEAD_ID"].ToString();
         ddlDonar.SelectedValue       = dtPopulateBudgetDonarMapDetails.Rows[0]["DONAR_ID"].ToString();
         ddlPaymentType.SelectedValue = dtPopulateBudgetDonarMapDetails.Rows[0]["PAYMENT_TYPE_ID"].ToString();
         ddlFiscalYear.SelectedValue  = dtPopulateBudgetDonarMapDetails.Rows[0]["FISCAL_YEAR_ID"].ToString();
         if ((dtPopulateBudgetDonarMapDetails.Rows[0]["IS_ENABLE"]).ToInt32() == 1)
         {
             chkIsEnable.Checked = true;
         }
         else
         {
             chkIsEnable.Checked = false;
         }
     }
 }