Ejemplo n.º 1
0
        /// <summary>
        /// Populates the role by id.
        /// </summary>
        /// <param name="activityDetailId">The activity detail id.</param>
        private void PopulateActivityDetailById(int activityDetailId)
        {
            objActivityBo                  = new ActivityDetailBO();
            objActivityBo.Lang             = Session["LanguageSetting"].ToString();
            objActivityBo.ActivityDetailId = activityDetailId;
            DataTable dt = new DataTable();

            wbs = new ActivityManagementService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
            dt = wbs.SelectActivityDetailById(objActivityBo);
            //Session["vdcList"] = dtvm;
            if (dt != null && dt.Rows.Count > 0)
            {
                txtActivityDetailNepName.Text = dt.Rows[0]["activity_detail_nep_name"].ToString();
                txtActivityDetailEngName.Text = dt.Rows[0]["activity_detail_eng_name"].ToString();
                txtActivityDetailId.Text      = dt.Rows[0]["activity_detail_id"].ToString();
                if (dt.Rows[0]["isenable"].ToString() == "1")
                {
                    IsActive.Checked = true;
                }
                else
                {
                    IsActive.Checked = false;
                }
                ddlSubSector.SelectedValue = dt.Rows[0]["ACTIVITY_SUB_SECTOR_ID"].ToString();
                ddlUnit.SelectedValue      = dt.Rows[0]["ACTIVITY_UNIT_ID"].ToString();
            }
            ClientScript.RegisterStartupScript(this.GetType(), "name1", "<script>  "
                                               + " $('#modal-form').modal();" + "  </script>");
        }
        private void BindUnit()
        {
            ActivityDetailBO objAdb = new ActivityDetailBO();

            objAdb.Lang            = Session["LanguageSetting"].ToString();
            objAms.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
            DataTable dtUnit = objAms.SelectActivityUnit(objAdb);

            ddlJaggaPraptiUnit.DataSource     = dtUnit;
            ddlJaggaPraptiUnit.DataTextField  = "UNIT_NAME";
            ddlJaggaPraptiUnit.DataValueField = "UNIT_ID";
            ddlJaggaPraptiUnit.DataBind();
            //ddlJaggaPraptiUnit.Items.Insert(0, "--छान्नुहोस्--");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Loads all Activity.
        /// </summary>
        private void LoadAllActivityDetail()
        {
            objActivityBo      = new ActivityDetailBO();
            objActivityBo.Lang = Session["LanguageSetting"].ToString();
            DataTable dt = new DataTable();

            wbs = new ActivityManagementService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
            dt = wbs.PopulateActivityDetail(objActivityBo);
            //Session["vdcList"] = dtvm;
            if (dt != null && dt.Rows.Count > 0)
            {
                lvRoles.DataSource = dt;
                lvRoles.DataBind();
            }
        }
        private void PopulateActivityDetail()
        {
            objActivityBo      = new ActivityDetailBO();
            objActivityBo.Lang = Session["LanguageSetting"].ToString();
            DataTable dt = new DataTable();

            wbs = new ActivityManagementService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
            dt = wbs.PopulateActivityDetail(objActivityBo);
            if (dt != null && dt.Rows.Count > 0)
            {
                ddlActivityDetail.DataSource     = dt;
                ddlActivityDetail.DataTextField  = "activity_detail_name";
                ddlActivityDetail.DataValueField = "activity_detail_id";
                ddlActivityDetail.DataBind();
            }
        }
        /// <summary>
        /// Populates the role by id.
        /// </summary>
        /// <param name="activityMapId">The activity map id.</param>
        private void PopulateActivityDetailById(int activityMapId)
        {
            objActivityOutputBo      = new ActivityOutputMapBO();
            objActivityOutputBo.Lang = Session["LanguageSetting"].ToString();
            objActivityOutputBo.ActivityOutputMapId = activityMapId;
            DataTable dt = new DataTable();

            wbs = new ActivityManagementService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
            dt = wbs.SelectActivityOutputById(objActivityOutputBo);
            //Session["vdcList"] = dtvm;
            if (dt != null && dt.Rows.Count > 0)
            {
                WebService1 objWebService = new WebService1();
                //bind Activity
                ddlActivityDetail.DataSource =
                    objWebService.FindActivityBySectorID(dt.Rows[0]["ACTIVITY_SUB_SECTOR_ID"].ToString());
                ddlActivityDetail.DataValueField = "ComboId";
                ddlActivityDetail.DataTextField  = "Name";
                ddlActivityDetail.DataBind();
                //bind output
                ddlOutput.DataSource =
                    objWebService.FindActivityOutputBySectorID(dt.Rows[0]["ACTIVITY_SUB_SECTOR_ID"].ToString());
                ddlOutput.DataValueField = "ComboId";
                ddlOutput.DataTextField  = "Name";
                ddlOutput.DataBind();
                //
                ddlSubSector.SelectedValue      = dt.Rows[0]["ACTIVITY_SUB_SECTOR_ID"].ToString();
                ddlActivityDetail.SelectedValue = dt.Rows[0]["ACTIVITY_DETAIL_ID"].ToString();
                ddlOutput.SelectedValue         = dt.Rows[0]["ACTIVITY_OUTPUT_ID"].ToString();
                if (dt.Rows[0]["isenabled"].ToString() == "1")
                {
                    IsActive.Checked = true;
                }
                else
                {
                    IsActive.Checked = false;
                }
                //ddlSubSector.SelectedValue = dt.Rows[0]["ACTIVITY_SUB_SECTOR_ID"].ToString();
                //ddlUnit.SelectedValue = dt.Rows[0]["ACTIVITY_UNIT_ID"].ToString();
            }
            LoadAllActivityDetail();
            ClientScript.RegisterStartupScript(this.GetType(), "name1", "<script>  "
                                               + " $('#modal-form').modal();  var bsModal = $.fn.modal.noConflict();" + "  </script>");
        }
Ejemplo n.º 6
0
        private void populateActivityUnit()
        {
            wbs = new ActivityManagementService();
            DataTable dtUnit = null;

            objActivityBo       = new ActivityDetailBO();
            objActivityBo.Lang  = Session["languageSetting"].ToString();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
            dtUnit = wbs.SelectActivityUnit(objActivityBo);
            if (dtUnit != null && dtUnit.Rows.Count > 0)
            {
                ddlUnit.DataSource     = dtUnit;
                ddlUnit.DataTextField  = "unit_name";
                ddlUnit.DataValueField = "unit_id";
                ddlUnit.DataBind();
                ddlUnit.Items.Insert(0, "-- छान्नुहोस्--");
            }
        }
        protected void btnAddRoles_Click(object sender, EventArgs e)
        {
            wbs = new ActivityManagementService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
            objActivityOutputBo = new ActivityOutputMapBO();
            if (hidActivityDetailId.Value.ToInt32() > 0)
            {
                objActivityOutputBo.Mode = "U";
                objActivityOutputBo.ActivityOutputMapId = hidActivityDetailId.Value.ToInt32();
            }
            else
            {
                objActivityOutputBo.Mode = "I";
            }

            objActivityOutputBo.ActivityOutputId = hidOutputId.Value.ToInt32();
            objActivityOutputBo.FiscalYearId     = 1;
            objActivityOutputBo.Isenabled        = IsActive.Checked == true ? 1 : 0;
            objActivityOutputBo.ActivityDetailId = hidSelectedActivityId.Value.ToInt32();
            wbs.ActivityOutputMap(objActivityOutputBo);
            Response.Redirect(Constants.ConstantAppPath + "/Modules/ActivityManagement/ActivityOutputMap.aspx");
        }
Ejemplo n.º 8
0
        protected void btnAddRoles_Click(object sender, EventArgs e)
        {
            wbs = new ActivityManagementService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
            objActivityBo       = new ActivityDetailBO();
            if (hidActivityDetailId.Value.ToInt32() > 0)
            {
                objActivityBo.Mode             = "U";
                objActivityBo.ActivityDetailId = hidActivityDetailId.Value.ToInt32();
            }
            else
            {
                objActivityBo.Mode = "I";
            }

            objActivityBo.ActivityDetailEngName = txtActivityDetailEngName.Text;
            objActivityBo.ActivityDetailNepName = txtActivityDetailNepName.Text;
            objActivityBo.Isenable            = IsActive.Checked == true ? 1 : 0;
            objActivityBo.ActivityUnitId      = ddlUnit.SelectedValue.ToInt32();
            objActivityBo.ActivitySubSectorId = ddlSubSector.SelectedValue.ToInt32();
            wbs.ActivityDetail(objActivityBo);
            Response.Redirect(Constants.ConstantAppPath + "/Modules/ActivityManagement/AddActivityDetail.aspx");
        }
        protected void rptOutput_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
            {
                ActivityManagementService objAms = new ActivityManagementService();
                DropDownList     ddlUnit         = (DropDownList)e.Item.FindControl("ddlUnit");
                ActivityDetailBO objAdb          = new ActivityDetailBO();
                objAdb.Lang            = Session["LanguageSetting"].ToString();
                objAms.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
                DataTable dtUnit = objAms.SelectActivityUnit(objAdb);

                if (dtUnit != null && dtUnit.Rows.Count > 0)
                {
                    ddlUnit.DataSource     = dtUnit;
                    ddlUnit.DataTextField  = "UNIT_NAME";
                    ddlUnit.DataValueField = "UNIT_ID";
                    ddlUnit.DataBind();
                    ddlUnit.Items.Insert(0, "--छान्नुहोस्--");
                }
                DropDownList ddlPlanUnit = new DropDownList();
                ddlPlanUnit = (DropDownList)e.Item.FindControl("ddlUnit");
                ddlPlanUnit.SelectedValue = dtA.Rows[e.Item.ItemIndex]["UNIT_ID"].ToString();
            }
        }
Ejemplo n.º 10
0
        protected void BtnEdit_Command(object sender, CommandEventArgs e)
        {
            int roleId = 0;

            if (e.CommandName == "edit")
            {
                roleId = int.Parse(e.CommandArgument.ToString());
                SecureQueryString str = new SecureQueryString();
                str["id"] = e.CommandArgument.ToString();
                Response.Redirect(Constants.ConstantAppPath + "/Modules/ActivityManagement/AddActivityDetail.aspx" + str.EncryptedString, false);
            }
            else if (e.CommandName == "delete")
            {
                int i = 0;
                wbs    = new ActivityManagementService();
                roleId = int.Parse(e.CommandArgument.ToString());
                wbs.AuthSoapHdValue            = ServiceAuth.ServiceAuthenticationActivity();
                objActivityBo                  = new ActivityDetailBO();
                objActivityBo.ActivityDetailId = roleId;
                objActivityBo.Mode             = "D";
                i = wbs.ActivityDetail(objActivityBo);
                //wbs.deleteDonar(donarId);
                if (i > 0)
                {
                    Response.Redirect(Constants.ConstantAppPath + "/Modules/ActivityManagement/AddActivityDetail.aspx");
                }
                else
                {
                    Response.Write("<script>alert('Delete failed')</script>");
                }
            }
            else if (e.CommandName == "lock")
            {
                wbs = new ActivityManagementService();
                int i = 0;
                roleId = int.Parse(e.CommandArgument.ToString());
                wbs.AuthSoapHdValue            = ServiceAuth.ServiceAuthenticationActivity();
                objActivityBo                  = new ActivityDetailBO();
                objActivityBo.ActivityDetailId = roleId;
                objActivityBo.Mode             = "L";
                i = wbs.ActivityDetail(objActivityBo);
                if (i > 0)
                {
                    Response.Redirect(Constants.ConstantAppPath + "/Modules/ActivityManagement/AddActivityDetail.aspx");
                }
                else
                {
                    Response.Write("<script>alert('Lock failed')</script>");
                }
            }
            else
            {
                wbs = new ActivityManagementService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationActivity();
                int i = 0;
                roleId        = int.Parse(e.CommandArgument.ToString());
                roleId        = int.Parse(e.CommandArgument.ToString());
                objActivityBo = new ActivityDetailBO();
                objActivityBo.ActivityDetailId = roleId;
                objActivityBo.Mode             = "L";
                i = wbs.ActivityDetail(objActivityBo);
                if (i > 0)
                {
                    Response.Redirect(Constants.ConstantAppPath + "/Modules/ActivityManagement/AddActivityDetail.aspx");
                }
                else
                {
                    Response.Write("<script>alert('Delete failed')</script>");
                }
            }
        }