private void PopulateSubSectors(int sid)
        {
            DataTable dt = new DataTable();

            objWebService                 = new OutputTargetService();
            objComOutputTarget            = new OutputTarget();
            objComOutputTarget.Lang       = Session["LanguageSetting"].ToString();
            objComOutputTarget.SectorId   = sid;
            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationOutputTarget();
            dt = objWebService.PopulateSubSectorsToFilter(objComOutputTarget);
            if (dt != null && dt.Rows.Count > 0)
            {
                ddlSubSector.DataSource     = dt;
                ddlSubSector.DataTextField  = "Sub_Sector_Name";
                ddlSubSector.DataValueField = "Activity_Sub_Sector_ID";
                ddlSubSector.DataBind();
                ddlSubSector.Items.Insert(0, "--उपक्षेत्र छान्नुहोस्--");

                ddlModalSubSector.DataSource     = dt;
                ddlModalSubSector.DataTextField  = "Sub_Sector_Name";
                ddlModalSubSector.DataValueField = "Activity_Sub_Sector_ID";
                ddlModalSubSector.DataBind();
                ddlModalSubSector.Items.Insert(0, "--उपक्षेत्र छान्नुहोस्--");
            }
        }
        protected void LoadReport(int prjlId, ReportDocument repDoc)
        {
            objBarsikService = new BarsikKaryekramService();
            ProjectOutputTBarsikBO objProjectOutBarsik = new ProjectOutputTBarsikBO();

            objProjectOutBarsik.Lang         = SessionHelper.SessionLanguageSetting;
            objBarsikService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBarsikKaryekram();
            objProjectOutBarsik.ProjectId    = prjlId;
            objProjectOutBarsik.FiscalYearId = SessionHelper.SessionFiscalYear.ToInt32();
            objProjectOutBarsik.ChaumasikId  = ddlChaumasik.SelectedValue.ToInt32();
            //Session["dtProjectPratifal"] = objBarsikService.PopulateProjectProgress(objProjectOutBarsik);
            DataTable dtProjectPratifal = (DataTable)Session["dtProjectPratifal"];

            Session["dtPopulateProjectPratifalReport"] = dtProjectPratifal;
            objRptFactory = new ReportFactory();
            objRptFactory.SetReport(repDoc);
            objRptServices = new ReportServices();
            objRptServices.GetReport(repDoc, RptViewer);

            /*repDoc.Database.Tables[0].SetDataSource(dtProjectNatija);*/

            repDoc.Database.Tables[0].SetDataSource(dtProjectPratifal);

            if (dtProjectPratifal != null && dtProjectPratifal.Rows.Count > 0)
            {
                RptViewer.ReportSource    = repDoc;
                Session["PratifalReport"] = repDoc;
            }
            else
            {
                RptViewer.ReportSource    = null;
                Session["PratifalReport"] = null;
            }
        }
コード例 #3
0
        public EstateDataRobustConnector(IConfigSource config, IHttpServer server, string configName) :
            base(config, server, configName)
        {
            IConfig serverConfig = config.Configs[m_ConfigName];

            if (serverConfig == null)
            {
                throw new Exception(String.Format("No section {0} in config file", m_ConfigName));
            }

            string service = serverConfig.GetString("LocalServiceModule",
                                                    String.Empty);

            if (service == String.Empty)
            {
                throw new Exception("No LocalServiceModule in config file");
            }

            Object[]           args      = new Object[] { config };
            IEstateDataService e_service = ServerUtils.LoadPlugin <IEstateDataService>(service, args);

            IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);;

            server.AddStreamHandler(new EstateServerGetHandler(e_service, auth));
            server.AddStreamHandler(new EstateServerPostHandler(e_service, auth));
        }
コード例 #4
0
        protected void BtnEdit_Command(object sender, CommandEventArgs e)
        {
            int projectId = 0;

            if (e.CommandName == "edit")
            {
                projectId = int.Parse(e.CommandArgument.ToString());
                SecureQueryString str = new SecureQueryString();
                str["id"] = e.CommandArgument.ToString();
                Response.Redirect(Constants.ConstantAppPath + "/Modules/RananitiKaryanitiManagement/AddEditRananiti.aspx" + str.EncryptedString);
            }
            else if (e.CommandName == "delete")
            {
                int i          = 0;
                int rananitiId = 0;
                rananitiId              = int.Parse(e.CommandArgument.ToString());
                objProjectBO            = new ComProjectBO();
                objProjectBO.RananitiId = rananitiId;
                objProjectBO.Mode       = "D";
                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                i = wbs.AddEditRananiti(objProjectBO);
                if (i > 0)
                {
                    Response.Redirect(Constants.ConstantAppPath + "/Modules/RananitiKaryanitiManagement/ListRananiti.aspx");
                }
                else
                {
                    Response.Write("<script>alert('Delete failed')</script>");
                }
            }
        }
コード例 #5
0
        public XBakesConnector(IConfigSource config, IHttpServer server, string configName) :
            base(config, server, configName)
        {
            if (configName != String.Empty)
            {
                m_ConfigName = configName;
            }

            IConfig serverConfig = config.Configs[m_ConfigName];

            if (serverConfig == null)
            {
                throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
            }

            string assetService = serverConfig.GetString("LocalServiceModule",
                                                         String.Empty);

            if (assetService == String.Empty)
            {
                throw new Exception("No BakedTextureService in config file");
            }

            Object[] args = new Object[] { config };
            m_BakesService =
                ServerUtils.LoadPlugin <IBakedTextureService>(assetService, args);

            IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);

            server.AddStreamHandler(new BakesServerGetHandler(m_BakesService, auth));
            server.AddStreamHandler(new BakesServerPostHandler(m_BakesService, auth));
        }
コード例 #6
0
        protected void ddlBudgetHead_SelectedIndexChanged(object sender, EventArgs e)
        {
            rptProblems.DataSource = null;
            rptProblems.DataBind();
            DataTable dtEmpty = new DataTable();

            ddlProjects.DataSource = dtEmpty;
            ddlProjects.DataBind();
            btnAddProblems.Visible    = false;
            btnSaveProblem.Visible    = false;
            objProjectBO              = new ComProjectBO();
            objProjectBO.BudgetHeadId = ddlBudgetHead.SelectedValue.ToInt32();
            objProjectBO.FiscalYearId = Session["fiscal_year_id"].ToInt32();
            objProjectBO.OfficeId     = Session["office_id"].ToInt32();
            objProjectBO.Lang         = Session["LanguageSetting"].ToString();
            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            dtProjectDetail     = wbs.PopulateProjectList(objProjectBO);
            if (dtProjectDetail != null && dtProjectDetail.Rows.Count > 0)
            {
                ddlProjects.DataSource     = dtProjectDetail;
                ddlProjects.DataTextField  = "PROJECT_NAME";
                ddlProjects.DataValueField = "PROJECT_ID";
                ddlProjects.DataBind();
                ddlProjects.Items.Insert(0, "--आयोजना छान्नुहोस्--");
            }
        }
コード例 #7
0
        private void loadUserDetails(string id)
        {
            objServiceUser = new UserManagementService();
            objServiceUser.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationUser();
            DataTable dtud = objServiceUser.FetchUserDetailsById(id);

            if (dtud != null && dtud.Rows.Count > 0)
            {
                txtUsername.Text = dtud.Rows[0]["LOGIN_ID"].ToString();
                txtNameEng.Text  = dtud.Rows[0]["USER_ENG_NAME"].ToString();
                txtNameNep.Text  = dtud.Rows[0]["USER_NEP_NAME"].ToString();
                //txtPassword.Text = dtud.Rows[0][""].ToString();
                ddlOffice.SelectedValue   = dtud.Rows[0]["OFFICE_ID"].ToString();
                ddlRole.SelectedValue     = dtud.Rows[0]["ROLE_ID"].ToString();
                ddlUserType.SelectedValue = dtud.Rows[0]["TYPE_ID"].ToString();
                txtMobile.Text            = dtud.Rows[0]["MOBILE_NO"].ToString();
                txtEmail.Text             = dtud.Rows[0]["EMAIL_ID"].ToString();
                if (dtud.Rows[0]["enable_disable"].ToString() == "1")
                {
                    chkIsEnable.Checked = true;
                }
                else
                {
                    chkIsEnable.Checked = false;
                }
            }
        }
        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;
                }
            }
        }
コード例 #9
0
        protected void btnAddBudgetHead_Click(object sender, EventArgs e)
        {
            int i = 0;

            objBudgetBo = new ComBudgetHeadBO();
            objBudgetBo.BudgetHeadEngName = txtBudgetHeadEnglishName.Text;
            objBudgetBo.BudgetHeadNepName = txtBudgetHeadNepaliName.Text;
            objBudgetBo.BudgetCode        = txtBudgetCode.Text;
            objBudgetBo.FiscalYearId      = ddlFiscalYear.SelectedValue.ToInt32();
            objBudgetBo.BudgetHeadId      = Session["budgetHeadId"].ToInt32();
            objBudgetBo.IsLocked          = 0;
            if (chkIsEnable.Checked == true)
            {
                objBudgetBo.IsEnable = 1;
            }
            else
            {
                objBudgetBo.IsEnable = 0;
            }
            objWebService = new Service1();
            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthentication();

            i = objWebService.AddEditBudgetHead(objBudgetBo);
            if (i > 0)
            {
                Response.Write("<script>alert('Budget Head added successfully!')</script>");
                Response.Redirect(Constants.ConstantAppPath + "/Modules/Budget/BudgHeadList1.aspx");
            }
            else
            {
                Response.Write("<script>alert('Budget Head addition failed!')</script>");
            }
        }
コード例 #10
0
        protected void btnAddMenu_Click(object sender, EventArgs e)
        {
            objComMenu.menuEnglishName = txtMenuEnglishName.Text;
            objComMenu.menuNepaliName  = txtMenuNepaliName.Text;
            objComMenu.menuPath        = txtMenuPath.Text;
            if (entryMode == 0)//to add new menu
            {
                objComMenu.menuParentId = menuId;
            }
            else // to edit existing menu
            {
                objComMenu.menuParentId = dtPopulateMenuDetails.Rows[0]["MENU_PARENT_ID"].ToInt16();
            }
            objComMenu.menuTypeId      = 1;
            objComMenu.menuLevel       = 1;
            objService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationMenu();
            int i = 0;

            i = objService.AddMenu(objComMenu, entryMode, menuId);
            if (i > 0)
            {
                Response.Write("<script>alert('Menu added successfully')</script>");
                Response.Redirect(Constants.ConstantAppPath + "/Modules/MenuManagement/ListMenu.aspx");
            }
            else
            {
                Response.Write("<script>alert('Menu addition failed')</script>");
            }
        }
コード例 #11
0
        private void PopulateFiscalYear()
        {
            objComLogin      = new ComLogin();
            objComLogin.Lang = Session["LanguageSetting"].ToString();
            objWebService    = new LoginService();
            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationLogin();
            dtFiscalYear = objWebService.PopulateFiscalYear(objComLogin);
            if (dtFiscalYear != null && dtFiscalYear.Rows.Count > 0)
            {
                ddlBaseYear.DataSource     = dtFiscalYear;
                ddlBaseYear.DataTextField  = "FISCAL_YEAR";
                ddlBaseYear.DataValueField = "FISCAL_YEAR_ID";
                ddlBaseYear.DataBind();
                ddlBaseYear.Items.Insert(0, "-- आ.व. छान्नुहोस्--");

                ddlFirstYear.DataSource     = dtFiscalYear;
                ddlFirstYear.DataTextField  = "FISCAL_YEAR";
                ddlFirstYear.DataValueField = "FISCAL_YEAR_ID";
                ddlFirstYear.DataBind();
                ddlFirstYear.Items.Insert(0, "-- आ.व. छान्नुहोस्--");

                ddlSecondYear.DataSource     = dtFiscalYear;
                ddlSecondYear.DataTextField  = "FISCAL_YEAR";
                ddlSecondYear.DataValueField = "FISCAL_YEAR_ID";
                ddlSecondYear.DataBind();
                ddlSecondYear.Items.Insert(0, "-- आ.व. छान्नुहोस्--");

                ddlThirdYear.DataSource     = dtFiscalYear;
                ddlThirdYear.DataTextField  = "FISCAL_YEAR";
                ddlThirdYear.DataValueField = "FISCAL_YEAR_ID";
                ddlThirdYear.DataBind();
                ddlThirdYear.Items.Insert(0, "-- आ.व. छान्नुहोस्--");
            }
        }
コード例 #12
0
        protected void BtnEdit_Command(object sender, CommandEventArgs e)
        {
            int ministryId = 0;

            if (e.CommandName == "edit")
            {
                ministryId = int.Parse(e.CommandArgument.ToString());
                SecureQueryString str = new SecureQueryString();
                str["ministryId"] = e.CommandArgument.ToString();
                Response.Redirect(Constants.ConstantAppPath + "/Modules/DirectoryManagement/AddMinistry.aspx" + str.EncryptedString, false);
            }
            else if (e.CommandName == "delete")
            {
                ministryId = int.Parse(e.CommandArgument.ToString());
                objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthentication();
                objWebService.deleteMinistry(ministryId);
                Response.Redirect(Constants.ConstantAppPath + "/Modules/DirectoryManagement/MinistryList.aspx");
            }
            else if (e.CommandName == "lock")
            {
                ministryId = int.Parse(e.CommandArgument.ToString());
                objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthentication();
                // objWebService.lockMinistry(ministryId);
                Response.Redirect(Constants.ConstantAppPath + "/Modules/DirectoryManagement/MinistryList.aspx");
            }
            else
            {
                ministryId = int.Parse(e.CommandArgument.ToString());
                objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthentication();
                // objWebService.lockMinistry(ministryId);
                Response.Redirect(Constants.ConstantAppPath + "/Modules/DirectoryManagement/MinistryList.aspx");
            }
        }
コード例 #13
0
        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>");
            }
        }
        private void PopulateActivities(int ssid)
        {
            DataTable dt = new DataTable();

            objWebService                  = new OutputTargetService();
            objComOutputTarget             = new OutputTarget();
            objComOutputTarget.Lang        = Session["LanguageSetting"].ToString();
            objComOutputTarget.SubSectorId = ssid;
            objWebService.AuthSoapHdValue  = ServiceAuth.ServiceAuthenticationOutputTarget();
            dt = objWebService.PopulateAllActivitiesToFilter(objComOutputTarget);
            if (dt != null && dt.Rows.Count > 0)
            {
                ddlActivity.DataSource     = dt;
                ddlActivity.DataTextField  = "ACTIVITY_NAME";
                ddlActivity.DataValueField = "ACTIVITY_DETAIL_ID";
                ddlActivity.DataBind();
                ddlActivity.Items.Insert(0, "--सूचक छान्नुहोस्--");

                ddlModalActivity.DataSource     = dt;
                ddlModalActivity.DataTextField  = "ACTIVITY_NAME";
                ddlModalActivity.DataValueField = "ACTIVITY_DETAIL_ID";
                ddlModalActivity.DataBind();
                ddlModalActivity.Items.Insert(0, "--सूचक छान्नुहोस्--");
            }
        }
        protected void rptParamarshaSankhya_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
            {
                DataTable    dtFiscalYear = null;
                DropDownList dll          = (DropDownList)e.Item.FindControl("ddlAaba");
                ComLogin     objComLogin  = new ComLogin();
                objComLogin.Lang = Session["LanguageSetting"].ToString();
                LoginService objWebService = new LoginService();
                objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationLogin();
                dtFiscalYear = objWebService.PopulateFiscalYear(objComLogin);
                if (dtFiscalYear != null && dtFiscalYear.Rows.Count > 0)
                {
                    dll.DataSource     = dtFiscalYear;
                    dll.DataTextField  = "FISCAL_YEAR";
                    dll.DataValueField = "FISCAL_YEAR_ID";
                    dll.DataBind();
                    dll.Items.Insert(0, "-- आ.व. छान्नुहोस्--");
                }

                DropDownList ddlFiscalYear = new DropDownList();
                ddlFiscalYear = (DropDownList)e.Item.FindControl("ddlAaba");
                ddlFiscalYear.SelectedValue = dtAPS.Rows[e.Item.ItemIndex]["FISCAL_YEAR_ID"].ToString();
            }
        }
コード例 #16
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>");
        }
コード例 #17
0
        protected void GrdTarget_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int i = 0;

            objComOutputTarget = new OutputTarget();
            if (e.CommandName == "edit")
            {
                GridViewRow gvr      = (GridViewRow)(((ImageButton)e.CommandSource).NamingContainer);
                int         RowIndex = gvr.RowIndex;
                objComOutputTarget.ActivityOutputMapId = int.Parse(e.CommandArgument.ToString());
                objComOutputTarget.PustyayiyekoShrot   = ((TextBox)grdTarget.Rows[RowIndex].FindControl("txtPustyayiyekoShrot")).Text;
                objComOutputTarget.TargetFirstYear     = ((TextBox)grdTarget.Rows[RowIndex].FindControl("txtFirstYearTarget")).Text;
                objComOutputTarget.TargetSecondYear    = ((TextBox)grdTarget.Rows[RowIndex].FindControl("txtSecondYearTarget")).Text;
                objComOutputTarget.TargetThirdYear     = ((TextBox)grdTarget.Rows[RowIndex].FindControl("txtThirdYearTarget")).Text;
                objWebService = new OutputTargetService();
                objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationOutputTarget();
                i = objWebService.AddTarget(objComOutputTarget);
                if (i > 0)
                {
                    Response.Write("<script>alert('Target successfully recorded.') </script>");
                    Response.Redirect(Constants.ConstantAppPath + "/Modules/OutputTargetManagement/ListTarget.aspx");
                }
                else
                {
                    Response.Write("<script>alert('Target not recorded.') </script>");
                }
            }
        }
コード例 #18
0
        // Called from standalone configurations
        public AssetProxyConnector(IConfigSource config, IHttpServer server, string configName, IFriendsSimConnector localConn) : base(config, server, configName)
        {
            try
            {
                if (configName != String.Empty)
                {
                    m_ConfigName = configName;
                }

                IConfig serverConfig = config.Configs[m_ConfigName];
                if (serverConfig == null)
                {
                    throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
                }

                m_AssetService = new AssetServerProxy(config, m_ConfigName);

                IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);

                server.AddStreamHandler(new AssetServerGetHandler(m_AssetService, auth, string.Empty));
                server.AddStreamHandler(new AssetServerPostHandler(m_AssetService, auth));
                server.AddStreamHandler(new AssetServerDeleteHandler(m_AssetService, AllowedRemoteDeleteTypes.None, auth));
                server.AddStreamHandler(new AssetsExistHandler(m_AssetService));
            }catch (Exception error)
            {
                m_log.Error(error.Message);
                m_log.Error(error.StackTrace);
            }
        }
コード例 #19
0
        protected void btn_AddUser_Click(object sender, EventArgs e)
        {
            if (txtPassword.Text == txtRePassword.Text && txtPassword.Text != null)
            {
                UserBo.Username      = txtUsername.Text;
                UserBo.NameEng       = txtNameEng.Text;
                UserBo.NameNep       = txtNameNep.Text;
                UserBo.Password      = txtPassword.Text;
                UserBo.Office        = Convert.ToInt32(ddlOffice.SelectedValue);
                UserBo.Role          = ddlRole.SelectedValue;
                UserBo.UserType      = Convert.ToInt32(ddlUserType.SelectedValue);
                UserBo.Mobile        = txtMobile.Text;
                UserBo.Email         = txtEmail.Text;
                UserBo.Organizarion  = null;
                UserBo.EnableDisable = (chkIsEnable.Checked) ? 1 : 0;
                UserBo.RequestStatus = null;
                UserBo.RequestedBy   = 0;


                if (Session["id"] != null && Session["id"].ToInt32() > 0)
                {
                    UserBo.UserId   = Session["id"].ToInt32();
                    UserBo.IsLocked = 0;
                    objServiceUser  = new UserManagementService();
                    objServiceUser.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationUser();
                    int i = objServiceUser.UpdateUserById(UserBo);
                    if (i > 0)
                    {
                        Response.Write("<script>alert('User Details Updated Successfully!');</script>");
                        Response.Redirect(Constants.ConstantAppPath + "/Modules/UserManagement/UsersList.aspx");
                    }
                    else
                    {
                        //not inserted
                        Response.Write("<script>alert('User Details Update Failed!');</script>");
                    }
                }
                else
                {
                    objServiceUser = new UserManagementService();
                    objServiceUser.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationUser();
                    int i = objServiceUser.InsertUser(UserBo);
                    if (i > 0)
                    {
                        Response.Write("<script>alert('User Added Successfully!');</script>");
                        Response.Redirect(Constants.ConstantAppPath + "/Modules/UserManagement/UsersList.aspx");
                    }
                    else
                    {
                        //not inserted
                        Response.Write("<script>alert('User Addition Failed');</script>");
                    }
                }
            }
            else
            {
                //password mismatch
                Response.Write("<script>alert('Password Mismatched');</script>");
            }
        }
コード例 #20
0
        private void PopulateProjectsByBudgetHead(int budgHeadId)
        {
            objProjectBO = new ComProjectBO();
            objProjectBO.BudgetHeadId       = budgHeadId;
            objProjectBO.FiscalYearId       = Session["fiscal_year_id"].ToInt32();
            objProjectBO.OfficeId           = Session["office_id"].ToInt32();
            objProjectBO.MinistryId         = Session["ministry_id"].ToInt32();
            objProjectBO.SelectedMinistryId = ddlMinistry.SelectedValue.ToInt32();
            objProjectBO.Lang = Session["LanguageSetting"].ToString();
            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();

            /*Session["dtProjectDetail"] = wbs.PopulateProjectListForReport(objProjectBO);
             * DataTable dtProjectDetail = (DataTable)Session["dtProjectDetail"];*/
            DataTable dtProjectDetail = wbs.PopulateProjectListForReport(objProjectBO);

            if (dtProjectDetail != null && dtProjectDetail.Rows.Count > 0)
            {
                ddlProject.DataSource     = dtProjectDetail;
                ddlProject.DataTextField  = "PROJECT_NAME";
                ddlProject.DataValueField = "PROJECT_ID";
                ddlProject.DataBind();
                ddlProject.Items.Insert(0, "--छान्नुहोस्--");
            }
        }
        protected void btnFilter_Click(object sender, EventArgs e)
        {
            lvProject.DataSource = null;
            lvProject.DataBind();
            DataTable dtProjects = null;

            objService1 = new Service1();
            objService1.AuthSoapHdValue = ServiceAuth.ServiceAuthentication();
            if (Session["office_type_id"].ToInt32() == 4 || Session["office_type_id"].ToInt32() == 5 ||
                Session["office_type_id"].ToInt32() == 6)
            {
                dtProjects = objService1.PopulatePPByUserId(Session["LanguageSetting"].ToString(),
                                                            Session["user_id"].ToInt32(), ddlTrimester.SelectedValue.ToInt32(), Session["fiscal_year_id"].ToInt32());
            }
            //for npc users and others;
            else
            {
                dtProjects = objService1.PopulatePPByMinistryId(Session["LanguageSetting"].ToString(),
                                                                ddlMinistry.SelectedValue.ToInt32(), ddlTrimester.SelectedValue.ToInt32(), Session["fiscal_year_id"].ToInt32());
            }

            if (dtProjects != null && dtProjects.Rows.Count > 0)
            {
                lvProject.DataSource = dtProjects;
                lvProject.DataBind();
            }
        }
コード例 #22
0
        protected void btnAddOffice_Click(object sender, EventArgs e)
        {
            objComOffice.officeEnglishName = txtOfficeEnglishName.Text;
            objComOffice.officeNepaliName  = txtOfficeNepaliName.Text;
            if (Session["entryMode"].ToInt32() == 0) // to add new
            {
                objComOffice.officeParentId = Session["officeId"].ToInt32();
            }
            else //to edit existing
            {
                DataTable dtPopulateOfficeDetails = (DataTable)Session["dtPopulateOfficeDetails"];
                objComOffice.officeParentId = dtPopulateOfficeDetails.Rows[0]["PARENT_OFFICE_ID"].ToInt16();
            }
            objComOffice.officeTypeId = ddlOfficeType.SelectedValue.ToInt16();
            /*objComOffice.ministryId = ddlMinistry.SelectedValue.ToInt16();*/
            objComOffice.vdcMunId         = ddlVdcMun.SelectedValue.ToInt16();
            objComOffice.districtId       = ddlDistrict.SelectedValue.ToInt16();
            objComOffice.isEnable         = (chkIsEnable.Checked) ? 1 : 0;
            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationOffice();
            int i = 0;

            i = objWebService.AddOffice(objComOffice, Session["entryMode"].ToInt32(), Session["officeId"].ToInt32());
            if (i > 0)
            {
                Response.Write("<script>alert('Office added successfully!')</script>");
                Response.Redirect(Constants.ConstantAppPath + "/Modules/OfficeManagement/OfficeList.aspx", false);
            }
            else
            {
                Response.Write("<script>alert('Office addition failed!')</script>");
            }
        }
 private void PopulateBudgetHead()
 {
     objService1 = new Service1();
     objService1.AuthSoapHdValue = ServiceAuth.ServiceAuthentication();
     // for project/program admin and data entry
     if (Session["role_id"].ToInt32() == 4 || Session["role_id"].ToInt32() == 6)
     {
         /*dtPopulateBudgetHead =
          *  objService1.PopulateAllBudgetHeadsByOfficeId(Session["LanguageSetting"].ToString(),
          *      Session["office_id"].ToInt32());*/
         dtPopulateBudgetHead =
             objService1.PopulateAllBudgetHeadsByUserId(Session["LanguageSetting"].ToString(),
                                                        Session["user_id"].ToInt32());
     }
     //for npc users and others;
     else
     {
         int ministryId = ddlMinistry.SelectedValue.ToInt32();
         dtPopulateBudgetHead =
             objService1.PopulateAllBudgetHeads(Session["LanguageSetting"].ToString(),
                                                ministryId);
     }
     if (dtPopulateBudgetHead != null && dtPopulateBudgetHead.Rows.Count > 0)
     {
         ddlBudgetHead.DataSource     = dtPopulateBudgetHead;
         ddlBudgetHead.DataTextField  = "BUDGET_HEAD_NAME";
         ddlBudgetHead.DataValueField = "BUDGET_HEAD_ID";
         ddlBudgetHead.DataBind();
         ddlBudgetHead.Items.Insert(0, "--छान्नुहोस्--");
     }
 }
コード例 #24
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="i"></param>
        private void populateOfficeDetails(int i)
        {
            objWebService.AuthSoapHdValue      = ServiceAuth.ServiceAuthenticationOffice();
            Session["dtPopulateOfficeDetails"] = objWebService.PopulateOfficeDetails(i);
            DataTable dtPopulateOfficeDetails = (DataTable)Session["dtPopulateOfficeDetails"];

            if (dtPopulateOfficeDetails != null && dtPopulateOfficeDetails.Rows.Count > 0)
            {
                txtOfficeEnglishName.Text   = dtPopulateOfficeDetails.Rows[0]["OFFICE_ENG_NAME"].ToString();
                txtOfficeNepaliName.Text    = dtPopulateOfficeDetails.Rows[0]["OfFICE_NEP_NAME"].ToString();
                ddlOfficeType.SelectedValue = dtPopulateOfficeDetails.Rows[0]["OFFICE_TYPE_ID"].ToString();
                /*ddlMinistry.SelectedValue = dtPopulateOfficeDetails.Rows[0]["MINISTRY_ID"].ToString();*/
                ddlDistrict.SelectedValue = dtPopulateOfficeDetails.Rows[0]["DISTRICT_ID"].ToString();
                PopulateVdcMunByDisId(ddlDistrict.SelectedValue.ToInt32());
                ddlVdcMun.SelectedValue = dtPopulateOfficeDetails.Rows[0]["VDC_MUN_ID"].ToString();
                if (dtPopulateOfficeDetails.Rows[0]["is_enable"].ToString() == "1")
                {
                    chkIsEnable.Checked = true;
                }
                else
                {
                    chkIsEnable.Checked = false;
                }
            }
        }
コード例 #25
0
        public XInventoryInConnector(IConfigSource config, IHttpServer server, string configName) :
            base(config, server, configName)
        {
            if (configName != String.Empty)
            {
                m_ConfigName = configName;
            }

            m_log.DebugFormat("[XInventoryInConnector]: Starting with config name {0}", m_ConfigName);

            IConfig serverConfig = config.Configs[m_ConfigName];

            if (serverConfig == null)
            {
                throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
            }

            string inventoryService = serverConfig.GetString("LocalServiceModule",
                                                             String.Empty);

            if (inventoryService == String.Empty)
            {
                throw new Exception("No InventoryService in config file");
            }

            Object[] args = new Object[] { config, m_ConfigName };
            m_InventoryService =
                ServerUtils.LoadPlugin <IInventoryService>(inventoryService, args);

            IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);

            server.AddStreamHandler(new XInventoryConnectorPostHandler(m_InventoryService, auth));
        }
コード例 #26
0
        protected void btnAddRananiti_Click(object sender, EventArgs e)
        {
            objProjectBO = new ComProjectBO();
            if (Session["rananitiId"].ToInt32() > 0)
            {
                objProjectBO.Mode       = "U";
                objProjectBO.RananitiId = Session["rananitiId"].ToInt32();
            }
            else
            {
                objProjectBO.Mode = "I";
            }
            objProjectBO.SubSector       = ddlSubSector.SelectedValue.ToInt32();
            objProjectBO.RananitiEngName = txtRananitiEnglishName.Text;
            objProjectBO.RananitiNepName = txtRananitiNepaliName.Text;
            int i = 0;

            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            i = wbs.AddEditRananiti(objProjectBO);
            if (i > 0)
            {
                Response.Write("<script>alert('Rananiti is inserted/updated successfully!')</script>");
            }
            else
            {
                Response.Write("<script>alert('Rananiti insertion/updation failed!')</script>");
            }
        }
        private void PopulateBudgetHead()
        {
            objService1 = new Service1();
            objService1.AuthSoapHdValue = ServiceAuth.ServiceAuthentication();
            // for project/program/pariyojana users
            if (Session["office_type_id"].ToInt32() == 4 || Session["office_type_id"].ToInt32() == 5 ||
                Session["office_type_id"].ToInt32() == 6)
            {
                Session["dtPopulateBudgetHead"] =
                    objService1.PopulateAllBudgetHeadsByUserId(Session["LanguageSetting"].ToString(),
                                                               Session["user_id"].ToInt32());
            }
            //for npc users and others;
            else
            {
                Session["dtPopulateBudgetHead"] =
                    objService1.PopulateAllBudgetHeads(Session["LanguageSetting"].ToString(),
                                                       ddlMinistry.SelectedValue.ToInt32());
            }

            DataTable dtPopulateBudgetHead = (DataTable)Session["dtPopulateBudgetHead"];

            if (dtPopulateBudgetHead != null && dtPopulateBudgetHead.Rows.Count > 0)
            {
                ddlBudghead.DataSource     = dtPopulateBudgetHead;
                ddlBudghead.DataTextField  = "BUDGET_HEAD_NAME";
                ddlBudghead.DataValueField = "BUDGET_HEAD_ID";
                ddlBudghead.DataBind();
                ddlBudghead.Items.Insert(0, "--छान्नुहोस्--");
            }
        }
コード例 #28
0
ファイル: XBakesHandler.cs プロジェクト: ikarosghoste/opensim
        public XBakesConnector(IConfigSource config, IHttpServer server, string configName) :
            base(config, server, configName)
        {
            if (configName != string.Empty)
            {
                m_ConfigName = configName;
            }

            IConfig serverConfig = config.Configs[m_ConfigName];

            if (serverConfig == null)
            {
                throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
            }

            string bakesServiceName = serverConfig.GetString("LocalServiceModule", string.Empty);

            if (string.IsNullOrWhiteSpace(bakesServiceName))
            {
                throw new Exception("No BakedTextureService in config file");
            }

            object[]             args         = new object[] { config };
            IBakedTextureService bakesService = ServerUtils.LoadPlugin <IBakedTextureService>(bakesServiceName, args);

            IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);

            server.AddSimpleStreamHandler(new BakesServerHandler(bakesService, auth), true);
        }
コード例 #29
0
        public GroupsServiceRobustConnector(IConfigSource config, IHttpServer server, string configName) :
            base(config, server, configName)
        {
            string key = string.Empty;

            if (configName != String.Empty)
            {
                m_ConfigName = configName;
            }

            m_log.DebugFormat("[Groups.RobustConnector]: Starting with config name {0}", m_ConfigName);

            IConfig groupsConfig = config.Configs[m_ConfigName];

            if (groupsConfig != null)
            {
                key = groupsConfig.GetString("SecretKey", string.Empty);
                m_log.DebugFormat("[Groups.RobustConnector]: Starting with secret key {0}", key);
            }
            else
            {
                m_log.WarnFormat("[Groups.RobustConnector]: Unable to find {0} section in configuration", m_ConfigName);
            }

            m_GroupsService = new GroupsService(config);

            IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName);

            server.AddStreamHandler(new GroupsServicePostHandler(m_GroupsService, auth));
        }
コード例 #30
0
        /// <summary>
        /// Populates the role by id.
        /// </summary>
        /// <param name="roleId">The role id.</param>
        private void PopulateRoleById(int roleId)
        {
            Roles objRoles = new Roles();

            objRoles.Lang   = Session["LanguageSetting"].ToString();
            objRoles.RoleId = roleId;
            DataTable dt = new DataTable();

            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationRole();
            dt = wbs.PopulateRoleById(objRoles);
            //Session["vdcList"] = dtvm;
            if (dt != null && dt.Rows.Count > 0)
            {
                txtRoleEngName.Text = dt.Rows[0]["role_eng_name"].ToString();
                txtRoleNepName.Text = dt.Rows[0]["role_nep_name"].ToString();
                txtRoleId.Text      = dt.Rows[0]["role_id"].ToString();
                if (dt.Rows[0]["isenable"].ToString() == "1")
                {
                    IsActive.Checked = true;
                }
                else
                {
                    IsActive.Checked = false;
                }
            }
            ClientScript.RegisterStartupScript(this.GetType(), "name1", "<script type='text/javascript' src='../../assets/js/bootstrap.js'></script><script>  "
                                               + " $('#modal-form').modal();" + "  </script>");
        }