コード例 #1
0
        public List <Combo> FindSahasabdiBikashGantabyaByLakshya(string lakshyaId)
        {
            ProjectService objWebService      = new ProjectService();
            ComProjectBO   objComProjectBO    = new ComProjectBO();
            DataTable      dtPopulateGantabya = new DataTable();
            List <Combo>   objList            = new List <Combo>();

            objWebService.AuthSoapHdValue          = ServiceAuth.ServiceAuthenticationProject();
            objComProjectBO.SahasabdiBikashLakshya = lakshyaId.ToInt32();
            objComProjectBO.Lang = Session["LanguageSetting"].ToString();
            dtPopulateGantabya   = objWebService.PopulateSahashrabdiBikashGantabya(objComProjectBO);
            if (dtPopulateGantabya != null && dtPopulateGantabya.Rows.Count > 0)
            {
                objList.Add(new Combo {
                    ComboId = 0, Name = "छान्नुहोस"
                });
                foreach (DataRow dr in dtPopulateGantabya.Rows)
                {
                    objList.Add(new Combo {
                        ComboId = dr["GANTABYA_ID"].ToInt32(), Name = dr["GANTABYA_NAME"].ToString()
                    });
                }
            }
            return(objList);
        }
コード例 #2
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>");
                }
            }
        }
コード例 #3
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>");
            }
        }
コード例 #4
0
        public List <Combo> FindDigoBikashSuchakByGantabya(string gantabyaId)
        {
            ProjectService objWebService    = new ProjectService();
            ComProjectBO   objComProjectBO  = new ComProjectBO();
            DataTable      dtPopulateSuchak = new DataTable();
            List <Combo>   objList          = new List <Combo>();

            objWebService.AuthSoapHdValue      = ServiceAuth.ServiceAuthenticationProject();
            objComProjectBO.DigoBikashGantabya = gantabyaId.ToInt32();
            objComProjectBO.Lang = Session["LanguageSetting"].ToString();
            dtPopulateSuchak     = objWebService.PopulateDigoBikashSuchak(objComProjectBO);
            if (dtPopulateSuchak != null && dtPopulateSuchak.Rows.Count > 0)
            {
                objList.Add(new Combo {
                    ComboId = 0, Name = "छान्नुहोस"
                });
                foreach (DataRow dr in dtPopulateSuchak.Rows)
                {
                    objList.Add(new Combo {
                        ComboId = dr["DIGO_SUCHAK_ID"].ToInt32(), Name = dr["DIGO_SUCHAK_NAME"].ToString()
                    });
                }
            }
            return(objList);
        }
コード例 #5
0
        public List <Combo> FindKaryanitiByRananitiId(string rananitiId)
        {
            ProjectService objWebService       = new ProjectService();
            ComProjectBO   objComProjectBO     = new ComProjectBO();
            DataTable      dtPopulateKaryaniti = new DataTable();
            List <Combo>   objList             = new List <Combo>();

            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            objComProjectBO.Rananiti      = rananitiId.ToInt32();
            objComProjectBO.Lang          = Session["LanguageSetting"].ToString();
            dtPopulateKaryaniti           = objWebService.PopulateKaryanitiByRananitiId(objComProjectBO);
            if (dtPopulateKaryaniti != null && dtPopulateKaryaniti.Rows.Count > 0)
            {
                objList.Add(new Combo {
                    ComboId = 0, Name = "छान्नुहोस"
                });
                foreach (DataRow dr in dtPopulateKaryaniti.Rows)
                {
                    objList.Add(new Combo {
                        ComboId = dr["KARYANITI_ID"].ToInt32(), Name = dr["KARYANITI_NAME"].ToString()
                    });
                }
            }
            return(objList);
        }
コード例 #6
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, "--छान्नुहोस्--");
            }
        }
コード例 #7
0
        public void FetchPragatiToDashboard(string ministryId, string priorityId, string chaumasikId, string fiscalYearId)
        {
            ProjectService  objWebService     = new ProjectService();
            ComProjectBO    objComProjectBO   = new ComProjectBO();
            DataTable       dtPopulateProject = new DataTable();
            List <barGraph> objList           = new List <barGraph>();

            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            objComProjectBO.Lang          = Session["LanguageSetting"].ToString();
            objComProjectBO.MinistryId    = ministryId.ToInt32();
            objComProjectBO.Priority      = priorityId.ToInt32();
            objComProjectBO.ChaumasikId   = chaumasikId.ToInt32();
            dtPopulateProject             = objWebService.PopulateProjectSamastigatReport(objComProjectBO);
            if (dtPopulateProject != null && dtPopulateProject.Rows.Count > 0)
            {
                foreach (DataRow dr in dtPopulateProject.Rows)
                {
                    objList.Add(new barGraph {
                        Project = dr["PROJECT_NEP_NAME"].ToString(), BhautikProgress = dr["BHAUTIK_PRAGATI"].ToDecimal(), BitiyeProgress = dr["BITIYE_PRAGATI"].ToDecimal()
                    });
                }
            }
            // return objList;

            this.Context.Response.ContentType = "application/json; charset=utf-8";

            this.Context.Response.Write(new JavaScriptSerializer().Serialize(objList).Replace("null", "true"));
        }
コード例 #8
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, "--आयोजना छान्नुहोस्--");
            }
        }
コード例 #9
0
        public List <Combo> FindProjectByMinistryId(int ministryId)
        {
            ProjectService objWebService     = new ProjectService();
            ComProjectBO   objComProjectBO   = new ComProjectBO();
            DataTable      dtPopulateProject = new DataTable();
            List <Combo>   objList           = new List <Combo>();

            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            objComProjectBO.Lang          = Session["LanguageSetting"].ToString();
            objComProjectBO.MinistryId    = ministryId;
            dtPopulateProject             = objWebService.PopulateProjectByMinstryId(objComProjectBO);

            if (dtPopulateProject != null && dtPopulateProject.Rows.Count > 0)
            {
                objList.Add(new Combo {
                    ComboId = 0, Name = "छान्नुहोस"
                });
                foreach (DataRow dr in dtPopulateProject.Rows)
                {
                    objList.Add(new Combo {
                        ComboId = dr["PROJECT_ID"].ToInt32(), Name = dr["PROJECT_NAME"].ToString()
                    });
                }
            }
            return(objList);
        }
        protected void lnkVerify_Click(object sender, EventArgs e)
        {
            int    i    = 0;
            string mode = string.Empty;

            objProjectBO              = new ComProjectBO();
            objProjectBO.ProjectId    = ddlProject.SelectedValue.ToInt32();
            objProjectBO.FiscalYearId = Session["fiscal_year_id"].ToInt32();
            objProjectBO.ChaumasikId  = ddlTrimester.SelectedValue.ToInt32();
            if (Session["role_id"].ToInt32() == 12)
            {
                objProjectBO.Mode = mode = "V1"; //verification level 1
            }
            else if (Session["role_id"].ToInt32() == 13)
            {
                objProjectBO.Mode = mode = "V2"; //verification level 2
            }
            else if (Session["role_id"].ToInt32() == 14)
            {
                objProjectBO.Mode = mode = "V3"; //verification level 3
            }
            else if (Session["role_id"].ToInt32() == 15)
            {
                objProjectBO.Mode = mode = "V4"; //verification level 4
            }
            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            int check = 0;

            check = wbs.CheckLowerLevelReportVerification(objProjectBO);

            if (check == 1)
            {
                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                i = wbs.AddReportVerification(objProjectBO);
                if (i > 0)
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect",
                                                        "alert('Report Verified.'); window.location='" +
                                                        Constants.ConstantAppPath + "/CrystalViewer/ProjectTrans/ProjectUpdateViewer.aspx';", true);
                }
                //Response.Redirect(Constants.ConstantAppPath + "/CrystalViewer/ProjectTrans/ProjectUpdateViewer.aspx");
                else
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect",
                                                        "alert('Verification failed.'); window.location='" +
                                                        Constants.ConstantAppPath + "/CrystalViewer/ProjectTrans/ProjectUpdateViewer.aspx';", true);
                    //Response.Write("<script>alert('Verification failed')</script>");
                }
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect",
                                                    "alert('Verification failed. Lower level verification is required.'); window.location='" +
                                                    Constants.ConstantAppPath + "/CrystalViewer/ProjectTrans/ProjectUpdateViewer.aspx';", true);
                //Response.Write("<script>alert('Verification failed. Lower level verification is required.')</script>");
            }
        }
コード例 #11
0
        //protected void ddlProject_SelectedIndexChanged(object sender, EventArgs e)
        //{

        //    //to clear the repeater before dropdown-selected value gets changed
        //    rptBhautikSamagri.DataSource = null;
        //    rptBhautikSamagri.DataBind();

        //    PopulateAdministrativeDetails(ddlProject.SelectedValue.ToInt32());
        //}

        private void PopulateAdministrativeDetails(int projectId)
        {
            DataTable dtBhautikSamagri = null;

            objProjectBO           = new ComProjectBO();
            objProjectBO.ProjectId = projectId;
            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            Session["dt"]       = wbs.PopulateAdministrativeDetails(objProjectBO);
            DataTable dt = (DataTable)Session["dt"];

            if (dt != null && dt.Rows.Count > 0)
            {
                rbdExistingJanashakti.SelectedValue = dt.Rows[0]["EXISTING_JANASHAKTI"].ToString();
                txtThapJanashakti.Text     = dt.Rows[0]["THAP_JANASHAKTI"].ToString();
                txtJanaShaktiKaifiyat.Text = dt.Rows[0]["THAP_JANASHAKTI_KAIFIYAT"].ToString();
                txtMinistryRaaya.Text      = dt.Rows[0]["MINISTRY_RAAYA"].ToString();
                txtChuttayiyekoRakam.Text  = dt.Rows[0]["CHUTTAYIYEKO_RAKAM"].ToString();
                txtDaatriBibaran.Text      = dt.Rows[0]["DAATRI_BIBARAN"].ToString();
                txtNepalSarkarBibaran.Text = dt.Rows[0]["NEPAL_SARKAR_BIBARAN"].ToString();
                txtPhaseOutPlan.Text       = dt.Rows[0]["PHASE_OUT_PLAN"].ToString();
                dtBhautikSamagri           = wbs.PopulateBhautikSamagri(objProjectBO);
                dtA = dtBhautikSamagri;
                if (dtBhautikSamagri != null && dtBhautikSamagri.Rows.Count > 0)
                {
                    rptBhautikSamagri.DataSource = dtBhautikSamagri;
                    rptBhautikSamagri.DataBind();
                    foreach (RepeaterItem rptItem in rptBhautikSamagri.Items)
                    {
                        TextBox      txtItem            = new TextBox();
                        DropDownList ddlUnit            = new DropDownList();
                        TextBox      txtAnumanitRakam   = new TextBox();
                        TextBox      txtQuantity        = new TextBox();
                        TextBox      txtSamagriKaifiyat = new TextBox();
                        txtItem            = (TextBox)rptItem.FindControl("txtItemName");
                        ddlUnit            = (DropDownList)rptItem.FindControl("ddlUnit");
                        txtQuantity        = (TextBox)rptItem.FindControl("txtQuantity");
                        txtAnumanitRakam   = (TextBox)rptItem.FindControl("txtAnumanitRakam");
                        txtSamagriKaifiyat = (TextBox)rptItem.FindControl("txtSamagriKaifiyat");
                    }
                }
                else
                {
                    dtA.Clear();
                    DataRow drB = dtA.NewRow();
                    drB["ITEM_NAME"]        = "";
                    drB["UNIT_ID"]          = 0;
                    drB["QUANTITY"]         = 0;
                    drB["ANUMANIT_RAKAM"]   = 0;
                    drB["SAMAGRI_KAIFIYAT"] = "";
                    dtA.Rows.Add(drB);

                    rptBhautikSamagri.DataSource = dtA;
                    rptBhautikSamagri.DataBind();
                }
            }
        }
コード例 #12
0
        private void PopulateDataForRepeater()
        {
            DataTable dt = null;

            objProjectBO           = new ComProjectBO();
            objProjectBO.ProjectId = ddlProjects.SelectedValue.ToInt32();
            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            dt  = wbs.PopulateProjectProblems(objProjectBO);
            dtA = dt;
            if (dt != null && dt.Rows.Count > 0)
            {
                rptProblems.DataSource = dt;
                rptProblems.DataBind();
                btnSaveProblem.Visible = true;
            }
        }
コード例 #13
0
        protected void btnSaveProblem_Click(object sender, EventArgs e)
        {
            objProjectBO           = new ComProjectBO();
            objProjectBO.ProjectId = ddlProjects.SelectedValue.ToInt32();
            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            wbs.ClearProjectProblems(objProjectBO);

            DropDownList ddlChaumasik   = new DropDownList();
            TextBox      txtProblems    = new TextBox();
            TextBox      txtReasons     = new TextBox();
            TextBox      txtEfforts     = new TextBox();
            TextBox      txtSuggestions = new TextBox();
            CheckBox     chkNdac        = new CheckBox();

            foreach (RepeaterItem rptItem in rptProblems.Items)
            {
                int k = 0;
                ddlChaumasik             = (DropDownList)rptItem.FindControl("ddlChaumasik");
                txtProblems              = (TextBox)rptItem.FindControl("txtProblems");
                txtReasons               = (TextBox)rptItem.FindControl("txtReasons");
                txtEfforts               = (TextBox)rptItem.FindControl("txtEfforts");
                txtSuggestions           = (TextBox)rptItem.FindControl("txtSuggestions");
                chkNdac                  = (CheckBox)rptItem.FindControl("chkNdac");
                objProjectBO             = new ComProjectBO();
                objProjectBO.ProjectId   = ddlProjects.SelectedValue.ToInt32();
                objProjectBO.ChaumasikId = ddlChaumasik.SelectedValue.ToInt32();
                objProjectBO.Problems    = txtProblems.Text;
                objProjectBO.Reasons     = txtReasons.Text;
                objProjectBO.Efforts     = txtEfforts.Text;
                objProjectBO.Suggestions = txtSuggestions.Text;
                if (chkNdac.Checked == true)
                {
                    objProjectBO.Ndac = 1;
                }
                else
                {
                    objProjectBO.Ndac = 0;
                }

                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                k = wbs.SaveProjectProblems(objProjectBO);
            }
        }
コード例 #14
0
        private void PopulateProjectsByMinistryId()
        {
            ProjectService objWebService     = new ProjectService();
            ComProjectBO   objComProjectBO   = new ComProjectBO();
            DataTable      dtPopulateProject = new DataTable();

            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            objComProjectBO.Lang          = Session["LanguageSetting"].ToString();
            objComProjectBO.MinistryId    = ddlMinistry.SelectedValue.ToInt32();
            dtPopulateProject             = objWebService.PopulateProjectByMinstryId(objComProjectBO);
            if (dtPopulateProject != null && dtPopulateProject.Rows.Count > 0)
            {
                ddlProject.DataSource     = dtPopulateProject;
                ddlProject.DataTextField  = "PROJECT_NAME";
                ddlProject.DataValueField = "PROJECT_ID";
                ddlProject.DataBind();
            }
        }
        private void PopulateProjects(int budgHeadId)
        {
            lvProject.DataSource = null;
            lvProject.DataBind();

            objProjectBO = new ComProjectBO();
            objProjectBO.BudgetHeadId = budgHeadId;
            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)
            {
                lvProject.DataSource = dtProjectDetail;
                lvProject.DataBind();
            }
        }
コード例 #16
0
        private void PopulateDigoBikashLakshya()
        {
            ComProjectBO obj = new ComProjectBO();

            obj.Lang = Session["LanguageSetting"].ToString();
            DataTable dtDigoBksLakshya = null;

            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            dtDigoBksLakshya    = wbs.PopulateDigoBikashLakshya(obj);
            if (dtDigoBksLakshya != null && dtDigoBksLakshya.Rows.Count > 0)
            {
                ddlDigoBikashLakshya.DataSource     = dtDigoBksLakshya;
                ddlDigoBikashLakshya.DataTextField  = "DIGO_LAKSHYA_NAME";
                ddlDigoBikashLakshya.DataValueField = "DIGO_LAKSHYA_ID";
                ddlDigoBikashLakshya.DataBind();
                ddlDigoBikashLakshya.Items.Insert(0, "--छान्नुहोस्--");
            }
        }
コード例 #17
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();
            }
        }
コード例 #18
0
        private void PopulateDigoBikashGantabya()
        {
            ProjectService objWebService      = new ProjectService();
            ComProjectBO   objComProjectBO    = new ComProjectBO();
            DataTable      dtPopulateGantabya = new DataTable();

            objWebService.AuthSoapHdValue     = ServiceAuth.ServiceAuthenticationProject();
            objComProjectBO.DigoBikashLakshya = ddlDigoBikashLakshya.SelectedValue.ToInt32();
            objComProjectBO.Lang = Session["LanguageSetting"].ToString();
            dtPopulateGantabya   = objWebService.PopulateDigoBikashGantabya(objComProjectBO);
            if (dtPopulateGantabya != null && dtPopulateGantabya.Rows.Count > 0)
            {
                ddlDigoBikashGantabya.DataSource     = dtPopulateGantabya;
                ddlDigoBikashGantabya.DataTextField  = "DIGO_GANTABYA_NAME";
                ddlDigoBikashGantabya.DataValueField = "DIGO_GANTABYA_ID";
                ddlDigoBikashGantabya.DataBind();
                ddlDigoBikashGantabya.Items.Insert(0, "--छान्नुहोस्--");
            }
        }
コード例 #19
0
        public string GetBarChartDataBarshik(ComProjectBO obj)
        {
            string         result        = string.Empty;
            ProjectService objWebService = new ProjectService();
            DataSet        ds            = null;
            DataTable      dt            = null;

            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            dt     = objWebService.PopulateBarshikChart(obj);
            result = " var BarChartDataBarshik = [";
            foreach (DataRow dr in dt.Rows)
            {
                result = result + "{'projectName':'" + dr["PROJECT_NEP_NAME"] + "','bhautik':" + dr["BHAUTIK_PRAGATI"] + ",'bitiye':" + dr["BITIYE_PRAGATI"] +
                         "},";
            }
            result = result.Substring(0, result.Length - 1);
            result = result + "];";
            return(result);
        }
        private void PopulateProjectSamastigatReport(ReportDocument repDoc)
        {
            objProjectBO              = new ComProjectBO();
            objProjectBO.MinistryId   = ddlMinistry.SelectedValue.ToInt32();
            objProjectBO.ChaumasikId  = ddlChaumasik.SelectedValue.ToInt32();
            objProjectBO.Priority     = ddlPriority.SelectedValue.ToInt32();
            objProjectBO.FiscalYearId = Session["fiscal_year_id"].ToInt32();
            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            dt = wbs.PopulateProjectSamastigatReport(objProjectBO);

            Session["dtPopulateProjectSamastigatReport"] = dt;
            //objPlanRpt = new PlanListRpt();
            objRptFactory = new ReportFactory();
            objRptFactory.SetReport(repDoc);


            objRptServices = new ReportServices();
            objRptServices.GetReport(repDoc, RptViewer);

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

            cryParameter(repDoc);

            if (dt != null && dt.Rows.Count > 0)
            {
                lnkVerify.Visible           = true;
                RptViewer.ReportSource      = repDoc;
                Session["SamastigatReport"] = repDoc;
            }
            else
            {
                RptViewer.ReportSource      = null;
                Session["SamastigatReport"] = null;
            }
            //chartViewer.ReportSource = objPrjBhautikPragatiGrpRpt;



            // crystalViewer.Zoom(75);
            //chartViewer.Zoom(93);
        }
コード例 #21
0
        private void PopulateSahashrabdiBikashSuchak()
        {
            ComProjectBO obj = new ComProjectBO();

            obj.Lang = Session["LanguageSetting"].ToString();
            DataTable DtBikashSuchak = null;

            wbs = new ProjectService();
            wbs.AuthSoapHdValue         = ServiceAuth.ServiceAuthenticationProject();
            obj.SahasabdiBikashGantabya = ddlSahasabdiBikashGantabya.SelectedValue.ToInt32();
            DtBikashSuchak = wbs.PopulateSahashrabdiBikashSuchak(obj);
            if (DtBikashSuchak != null && DtBikashSuchak.Rows.Count > 0)
            {
                ddlSahasabdiBikashSuchak.DataSource     = DtBikashSuchak;
                ddlSahasabdiBikashSuchak.DataTextField  = "SUCHAK_NAME";
                ddlSahasabdiBikashSuchak.DataValueField = "SUCHAK_ID";
                ddlSahasabdiBikashSuchak.DataBind();
                ddlSahasabdiBikashSuchak.Items.Insert(0, "--छान्नुहोस्--");
            }
        }
        protected void LoadReport(int prjlId, ReportDocument repDoc)
        {
            objProjectBO           = new ComProjectBO();
            objProjectBO.ProjectId = prjlId; // prjlId.ToInt32();

            wbs = new ProjectService();
            wbs.AuthSoapHdValue        = ServiceAuth.ServiceAuthenticationProject();
            Session["dtProjectDetail"] = wbs.PopulateProjectListRpt(objProjectBO);
            int fiscalYearId = SessionHelper.SessionFiscalYear.ToInt32();
            //Provide parameter values



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

            if (dtProjectDetail != null && dtProjectDetail.Rows.Count > 0)
            {
                //cryParameter(repDoc);
                //objPlanRpt = new PlanListRpt();

                //this limits the queue

                lnkVerify.Visible = true;
                objRptFactory     = new ReportFactory();
                objRptFactory.SetReport(repDoc);

                objRptServices = new ReportServices();
                objRptServices.GetReport(repDoc, tabviewer);
                repDoc.Database.Tables[0].SetDataSource(dtProjectDetail);
                cryParameter(repDoc);
                tabviewer.ReportSource = repDoc;
                tabviewer.DataBind();
                Session["ProjectUpdateReport"] = repDoc;
            }

            else
            {
                tabviewer.ReportSource         = null;
                Session["ProjectUpdateReport"] = null;
            }
        }
コード例 #23
0
        private void LoadBarChart()
        {
            ProjectService objWebService     = new ProjectService();
            ComProjectBO   objComProjectBO   = new ComProjectBO();
            DataTable      dtPopulateProject = new DataTable();

            //amcharts bar
            WebService1 serv   = new WebService1();
            string      result = string.Empty;

            objComProjectBO.Lang = Session["LanguageSetting"].ToString();
            //objComProjectBO.MinistryId = ddlMinistry.SelectedValue.ToInt32();
            //objComProjectBO.Priority = ddlPriority.SelectedValue.ToInt32();
            objComProjectBO.ProjectId    = ddlProject.SelectedValue.ToInt32();
            objComProjectBO.ChaumasikId  = ddlChaumasik.SelectedValue.ToInt32();
            objComProjectBO.FiscalYearId = Session["fiscal_year_id"].ToInt32();
            result = serv.GetBarChartDataBarshik(objComProjectBO);
            // result = "var chartData=" + result+";";
            ClientScript.RegisterClientScriptBlock(this.GetType(), "bar2", "<script>" + result + "   </script>");
            ClientScript.RegisterStartupScript(this.GetType(), "bar3", "<script>" + result + "   </script>");
        }
コード例 #24
0
        private void PopulateProjectOutput(int projectId, int fiscalYearId)
        {
            DataTable dtProjectOutput = null;

            objProjectBO              = new ComProjectBO();
            objProjectBO.ProjectId    = projectId;
            objProjectBO.FiscalYearId = fiscalYearId;
            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            dtA = dtProjectOutput = wbs.PopulateProjectOutput(objProjectBO);

            if (dtProjectOutput != null && dtProjectOutput.Rows.Count > 0)
            {
                rptOutput.DataSource = dtProjectOutput;
                rptOutput.DataBind();
                lblModification.Text = dtProjectOutput.Rows[0]["MODIFIED_DATE"].ToDateTime().ToString("D");
                lblModifiedBy.Text   = dtProjectOutput.Rows[0]["MODIFIED_BY"].ToString();
            }
            else
            {
                dtA.Clear();
                DataRow drB = dtA.NewRow();
                drB["OUTPUT_ORDER"]          = 0;
                drB["OUTPUT"]                = "";
                drB["UNIT_ID"]               = 0;
                drB["YEARLY_TARGET"]         = 0;
                drB["FIRST_QUARTER_TARGET"]  = 0;
                drB["SECOND_QUARTER_TARGET"] = 0;
                drB["THIRD_QUARTER_TARGET"]  = 0;
                drB["OUTPUT_REMARKS"]        = "";
                dtA.Rows.Add(drB);

                rptOutput.DataSource = dtA;
                rptOutput.DataBind();
            }
        }
コード例 #25
0
        public string GetChartData(int ministryId, string mode, int trimesterId)
        {
            string result = string.Empty;

            ProjectService objWebService   = new ProjectService();
            ComProjectBO   objComProjectBO = new ComProjectBO();

            DataSet   ds = null;
            DataTable dt = null;

            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            objComProjectBO.MinistryId    = ministryId.ToInt32();
            objComProjectBO.FiscalYearId  = SessionHelper.SessionFiscalYear.ToInt32();
            objComProjectBO.Mode          = mode;
            objComProjectBO.ChaumasikId   = trimesterId;
            dt = objWebService.PopulateChartData(objComProjectBO);

            // dt = ds.Tables[0];
            if (mode == "1")
            {
                result = " var chartData = [";
            }
            else if (mode == "2")
            {
                result = " var chartData2 = [";
            }
            else if (mode == "3")
            {
                result = " var chartData3 = [";
            }
            else
            {
            }
            foreach (DataRow dr in dt.Rows)
            {
                if (mode == "2" || mode == "3")
                {
                    if (dr["name"].ToString() == "<50")
                    {
                        result = result + "{'country':'" + dr["name"] + "','value50':" + dr["no"] +
                                 "},";
                    }
                    else if (dr["name"].ToString() == ">50 and <80")
                    {
                        result = result + "{'country':'" + dr["name"] + "','value5080':" + dr["no"] +
                                 "},";
                    }
                    else
                    {
                        result = result + "{'country':'" + dr["name"] + "','value80':" + dr["no"] +
                                 "},";
                    }
                }
                else
                {
                    result = result + "{'country':'" + dr["name"] + "','value':" + dr["no"] +
                             "},";
                }
            }
            result = result.Substring(0, result.Length - 1);
            result = result + "];";
            return(result);
        }
コード例 #26
0
 public DataTable PopulateParamarsaBibaran(ComProjectBO objProjectDetail)
 {
     Authentication();
     return(objProject.PopulateParamarsaBibaran(objProjectDetail));
 }
コード例 #27
0
        private void PopulateProjectDetails(int projectId)
        {
            DataTable    dtProjectSansodhan = null;
            ComProjectBO obj = new ComProjectBO();
            DataTable    dtPopulateProjectDetails = null;

            obj.ProjectId            = projectId;
            wbs                      = new ProjectService();
            wbs.AuthSoapHdValue      = ServiceAuth.ServiceAuthenticationProject();
            dtPopulateProjectDetails = wbs.PopulateProjectDetails(obj);
            if (dtPopulateProjectDetails != null && dtPopulateProjectDetails.Rows.Count > 0)
            {
                ddlBudgetHead.SelectedValue      = dtPopulateProjectDetails.Rows[0]["BUDGET_HEAD_ID"].ToString();
                txtAyojanaNepName.Text           = dtPopulateProjectDetails.Rows[0]["PROJECT_NEP_NAME"].ToString();
                txtAyojanaEngName.Text           = dtPopulateProjectDetails.Rows[0]["PROJECT_ENG_NAME"].ToString();
                txtAyojanaLakshya.Text           = dtPopulateProjectDetails.Rows[0]["PROJECT_LAKSHYA"].ToString();
                txtAyojanaUdeshya.Text           = dtPopulateProjectDetails.Rows[0]["PROJECT_UDESHYA"].ToString();
                txtAyojanaPratifal.Text          = dtPopulateProjectDetails.Rows[0]["PROJECT_PRATIFAL"].ToString();
                txtAyojanaKriyakalap.Text        = dtPopulateProjectDetails.Rows[0]["PROJECT_MAIN_ACTIVITY"].ToString();
                rblKaryakramPrakar.SelectedValue = dtPopulateProjectDetails.Rows[0]["PROJECT_PROGRAM_TYPE"].ToString();
                txtSuruMiti.Text                = dtPopulateProjectDetails.Rows[0]["SURU_MITI"].ToString();
                txtAyojanaSampannaMiti.Text     = dtPopulateProjectDetails.Rows[0]["SAMPAANA_MITI"].ToString();
                rbdJalBayuSanket.SelectedValue  = dtPopulateProjectDetails.Rows[0]["JALVAYU_SANKET"].ToString();
                rbdYojanaRananiti.SelectedValue = dtPopulateProjectDetails.Rows[0]["YOJANA_RANANITI_NO"].ToString();
                lblModification.Text            = dtPopulateProjectDetails.Rows[0]["MODIFIED_DATE"].ToDateTime().ToString("D");
                lblModifiedBy.Text              = dtPopulateProjectDetails.Rows[0]["MODIFIED_BY"].ToString();

                /* txtAyojanaSampannaMitiPratham.Text =dtPopulateProjectDetails.Rows[0]["SAMPAANA_MITI1"].ToString();
                 * txtAyojanaSampannaMitiDoshro.Text =dtPopulateProjectDetails.Rows[0]["SAMPAANA_MITI2"].ToString();
                 * txtAyojanaSampannaMitiTeshro.Text =dtPopulateProjectDetails.Rows[0]["SAMPAANA_MITI3"].ToString();*/
                ddlSector.SelectedValue        = dtPopulateProjectDetails.Rows[0]["SECTOR_ID"].ToString();
                Session["project_ministry_id"] = dtPopulateProjectDetails.Rows[0]["MINISTRY_ID"].ToInt32();

                SectorService objWebService       = new SectorService();
                ComSubSector  objComSubSector     = new ComSubSector();
                DataTable     dtPopulateSubSector = null;
                objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationSector();
                objComSubSector.SectorId      = dtPopulateProjectDetails.Rows[0]["SECTOR_ID"].ToInt32();
                objComSubSector.Lang          = Session["LanguageSetting"].ToString();
                dtPopulateSubSector           = objWebService.PopulateSubSectorsBySectorId(objComSubSector);
                if (dtPopulateSubSector != null && dtPopulateSubSector.Rows.Count > 0)
                {
                    ddlSubSector.DataSource     = dtPopulateSubSector;
                    ddlSubSector.DataTextField  = "SUB_SECTOR_NAME";
                    ddlSubSector.DataValueField = "ACTIVITY_SUB_SECTOR_ID";
                    ddlSubSector.DataBind();
                    ddlSubSector.Items.Insert(0, "छान्नुहोस्");
                }
                hidSubSector.Value = ddlSubSector.SelectedValue = dtPopulateProjectDetails.Rows[0]["SUB_SECTOR_ID"].ToString();
                ProjectService  objPs              = new ProjectService();
                EntitySubSector objCss             = new EntitySubSector();
                DataTable       dtPopulateRananiti = null;
                objPs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                objCss.SubSectorId    = ddlSubSector.SelectedValue.ToInt32();
                objCss.Lang           = Session["LanguageSetting"].ToString();
                dtPopulateRananiti    = objPs.PopulateRananitiBySubSectorId(objCss);
                if (dtPopulateRananiti != null && dtPopulateRananiti.Rows.Count > 0)
                {
                    ddlRananiti.DataSource     = dtPopulateRananiti;
                    ddlRananiti.DataTextField  = "RANANITI_NAME";
                    ddlRananiti.DataValueField = "RANANITI_ID";
                    ddlRananiti.DataBind();
                    ddlRananiti.Items.Insert(0, "छान्नुहोस्");
                }

                hidRananiti.Value = ddlRananiti.SelectedValue = dtPopulateProjectDetails.Rows[0]["RANANITI_ID"].ToString();

                objPs = new ProjectService();
                ComProjectBO objComProjectBO     = new ComProjectBO();
                DataTable    dtPopulateKaryaniti = new DataTable();
                objPs.AuthSoapHdValue    = ServiceAuth.ServiceAuthenticationProject();
                objComProjectBO.Rananiti = ddlRananiti.SelectedValue.ToInt32();
                objComProjectBO.Lang     = Session["LanguageSetting"].ToString();
                dtPopulateKaryaniti      = objPs.PopulateKaryanitiByRananitiId(objComProjectBO);
                if (dtPopulateKaryaniti != null && dtPopulateKaryaniti.Rows.Count > 0)
                {
                    ddlKaryaniti1.DataSource     = dtPopulateKaryaniti;
                    ddlKaryaniti1.DataTextField  = "KARYANITI_NAME";
                    ddlKaryaniti1.DataValueField = "KARYANITI_ID";
                    ddlKaryaniti1.DataBind();
                    ddlKaryaniti1.Items.Insert(0, "छान्नुहोस्");
                    ddlKaryaniti2.DataSource     = dtPopulateKaryaniti;
                    ddlKaryaniti2.DataTextField  = "KARYANITI_NAME";
                    ddlKaryaniti2.DataValueField = "KARYANITI_ID";
                    ddlKaryaniti2.DataBind();
                    ddlKaryaniti2.Items.Insert(0, "छान्नुहोस्");
                    ddlKaryaniti3.DataSource     = dtPopulateKaryaniti;
                    ddlKaryaniti3.DataTextField  = "KARYANITI_NAME";
                    ddlKaryaniti3.DataValueField = "KARYANITI_ID";
                    ddlKaryaniti3.DataBind();
                    ddlKaryaniti3.Items.Insert(0, "छान्नुहोस्");
                }

                hidKaryaniti1.Value = ddlKaryaniti1.SelectedValue = dtPopulateProjectDetails.Rows[0]["KARYANITI_ID1"].ToString();
                hidKaryaniti2.Value = ddlKaryaniti2.SelectedValue = dtPopulateProjectDetails.Rows[0]["KARYANITI_ID2"].ToString();
                hidKaryaniti3.Value = ddlKaryaniti3.SelectedValue = dtPopulateProjectDetails.Rows[0]["KARYANITI_ID3"].ToString();
                //added later
                if (dtPopulateProjectDetails.Rows[0]["SAHASRABDI_OR_DIGO"].ToInt32() == 1)
                {
                    rbdSahaSrabdiDigo.SelectedValue = "1";

                    /*sahaSrabdi1.Visible = true;
                     * sahaSrabdi2.Visible = true;
                     * sahaSrabdi3.Visible = true;
                     * digo1.Visible = false;
                     * digo2.Visible = false;
                     * digo3.Visible = false;*/
                }
                else
                {
                    rbdSahaSrabdiDigo.SelectedValue = "2";

                    /*sahaSrabdi1.Visible = false;
                     * sahaSrabdi2.Visible = false;
                     * sahaSrabdi3.Visible = false;
                     * digo1.Visible = true;
                     * digo2.Visible = true;
                     * digo3.Visible = true;*/
                }

                ddlSahasabdiBikashLakshya.SelectedValue =
                    dtPopulateProjectDetails.Rows[0]["SAHA_BIKASH_LAKSHYA"].ToString();

                ddlDigoBikashLakshya.SelectedValue = dtPopulateProjectDetails.Rows[0]["DIGO_BIKASH_LAKSHYA"].ToString();

                if (dtPopulateProjectDetails.Rows[0]["SAHASRABDI_OR_DIGO"].ToInt32() == 1)
                {
                    PopulateSahashrabdiBikashGantabya();
                }
                else
                {
                    PopulateDigoBikashGantabya();
                }

                /* objPs = new ProjectService();
                 * objComProjectBO = new ComProjectBO();
                 * DataTable dtPopulateGantabya = new DataTable();
                 * DataTable dtPopulateDigoGantabya = new DataTable();
                 *
                 * objPs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                 * objComProjectBO.SahasabdiBikashLakshya = ddlSahasabdiBikashLakshya.SelectedValue.ToInt32();
                 * objComProjectBO.Lang = Session["LanguageSetting"].ToString();
                 * objComProjectBO.DigoBikashLakshya = ddlDigoBikashLakshya.SelectedValue.ToInt32();
                 * dtPopulateGantabya = objPs.PopulateSahashrabdiBikashGantabya(objComProjectBO);
                 * dtPopulateDigoGantabya = objPs.PopulateDigoBikashGantabya(objComProjectBO);
                 *
                 * if (dtPopulateGantabya != null && dtPopulateGantabya.Rows.Count > 0)
                 * {
                 *   ddlSahasabdiBikashGantabya.DataSource = dtPopulateGantabya;
                 *   ddlSahasabdiBikashGantabya.DataTextField = "GANTABYA_NAME";
                 *   ddlSahasabdiBikashGantabya.DataValueField = "GANTABYA_ID";
                 *   ddlSahasabdiBikashGantabya.DataBind();
                 *   ddlSahasabdiBikashGantabya.Items.Insert(0, "छान्नुहोस्");
                 *
                 * }*/

                hidSahasabdiBikashGantabya.Value = ddlSahasabdiBikashGantabya.SelectedValue =
                    dtPopulateProjectDetails.Rows[0]["SAHA_BIKASH_GANTABYA"].ToString();

                /*if (dtPopulateDigoGantabya != null && dtPopulateDigoGantabya.Rows.Count > 0)
                 * {
                 *  ddlDigoBikashGantabya.DataSource = dtPopulateDigoGantabya;
                 *  ddlDigoBikashGantabya.DataTextField = "DIGO_GANTABYA_NAME";
                 *  ddlDigoBikashGantabya.DataValueField = "DIGO_GANTABYA_ID";
                 *  ddlDigoBikashGantabya.DataBind();
                 *  ddlDigoBikashGantabya.Items.Insert(0, "छान्नुहोस्");
                 * }*/
                hidDigoBikashGantavya.Value = ddlDigoBikashGantabya.SelectedValue =
                    dtPopulateProjectDetails.Rows[0]["DIGO_BIKASH_GANTABYA"].ToString();

                if (dtPopulateProjectDetails.Rows[0]["SAHASRABDI_OR_DIGO"].ToInt32() == 1)
                {
                    PopulateSahashrabdiBikashSuchak();
                }
                else
                {
                    PopulateDigoBikashSuchak();
                }

                /*objPs = new ProjectService();
                 * objComProjectBO = new ComProjectBO();
                 * DataTable dtPopulateSuchak = new DataTable();
                 * DataTable dtPopulateDigoSuchak = new DataTable();
                 * objPs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                 * objComProjectBO.SahasabdiBikashGantabya = ddlSahasabdiBikashGantabya.SelectedValue.ToInt32();
                 * objComProjectBO.Lang = Session["LanguageSetting"].ToString();
                 * objComProjectBO.DigoBikashGantabya = ddlDigoBikashGantabya.SelectedValue.ToInt32();
                 * dtPopulateSuchak = objPs.PopulateSahashrabdiBikashSuchak(objComProjectBO);
                 * dtPopulateDigoSuchak = objPs.PopulateDigoBikashSuchak(objComProjectBO);
                 * if (dtPopulateSuchak != null && dtPopulateSuchak.Rows.Count > 0)
                 * {
                 *  ddlSahasabdiBikashSuchak.DataSource = dtPopulateSuchak;
                 *  ddlSahasabdiBikashSuchak.DataTextField = "SUCHAK_NAME";
                 *  ddlSahasabdiBikashSuchak.DataValueField = "SUCHAK_ID";
                 *  ddlSahasabdiBikashSuchak.DataBind();
                 *  ddlSahasabdiBikashSuchak.Items.Insert(0, "छान्नुहोस्");
                 * }
                 *
                 * if (dtPopulateDigoSuchak != null && dtPopulateDigoSuchak.Rows.Count > 0)
                 * {
                 *  ddlDigoBikashSuchak.DataSource = dtPopulateDigoSuchak;
                 *  ddlDigoBikashSuchak.DataTextField = "DIGO_SUCHAK_NAME";
                 *  ddlDigoBikashSuchak.DataValueField = "DIGO_SUCHAK_ID";
                 *  ddlDigoBikashSuchak.DataBind();
                 *  ddlDigoBikashSuchak.Items.Insert(0, "छान्नुहोस्");
                 * }*/


                hidSahasabdiBikashSuchak.Value = ddlSahasabdiBikashSuchak.SelectedValue =
                    dtPopulateProjectDetails.Rows[0]["SAHA_BIKASH_SUCHAK"].ToString();
                hidDigoBikashSuchak.Value             =
                    ddlDigoBikashSuchak.SelectedValue =
                        dtPopulateProjectDetails.Rows[0]["DIGO_BIKASH_SUCHAK"].ToString();

                rbdGaribiSankhet.SelectedValue  = dtPopulateProjectDetails.Rows[0]["GARIBI_SANKET"].ToString();
                rbdLaingikSankhet.SelectedValue = dtPopulateProjectDetails.Rows[0]["LAINGIK_SANKET"].ToString();
                string        AayojanaKisim = dtPopulateProjectDetails.Rows[0]["AAYOJANA_KISIM"].ToString();
                List <string> AayojanaType  = AayojanaKisim.Split(new char[] { ',' }).ToList <string>();

                for (int i = 0; i < chkAyojanaKisim.Items.Count; i++)
                {
                    for (int j = 0; j < AayojanaType.Count; j++)
                    {
                        if (chkAyojanaKisim.Items[i].Value == AayojanaType[j])
                        {
                            chkAyojanaKisim.Items[i].Selected = true;
                            break;
                        }
                    }
                }
                rbdMadhyaKharchaYojana.SelectedValue = dtPopulateProjectDetails.Rows[0]["PRIORITY"].ToString();
                txtKaryanayanNikaya.Text             = dtPopulateProjectDetails.Rows[0]["NIKAAYA"].ToString();
                txtAyojanaLagat.Text = dtPopulateProjectDetails.Rows[0]["KUL_LAAGAT"].ToString();
                if (dtPopulateProjectDetails.Rows[0]["IS_ENABLE"].ToInt32() == 1)
                {
                    chkEnable.Checked = true;
                }
                else
                {
                    chkEnable.Checked = false;
                }
                obj                 = new ComProjectBO();
                obj.ProjectId       = projectId;
                wbs                 = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                dtProjectSansodhan  = wbs.PopulateProjectSansodhan(obj);
                dtA                 = dtProjectSansodhan;
                if (dtProjectSansodhan != null && dtProjectSansodhan.Rows.Count > 0)
                {
                    rptSansodhan.DataSource = dtProjectSansodhan;
                    rptSansodhan.DataBind();
                    foreach (RepeaterItem rptItem in rptSansodhan.Items)
                    {
                        TextBox txtSansodhanDate = new TextBox();
                        txtSansodhanDate = (TextBox)rptItem.FindControl("txtSansodhanDate");
                    }
                }
                else
                {
                    dtA.Clear();
                    DataRow drB = dtA.NewRow();
                    drB["SANSODHAN_DATE"] = "";
                    dtA.Rows.Add(drB);

                    rptSansodhan.DataSource = dtA;
                    rptSansodhan.DataBind();
                }
            }
        }
コード例 #28
0
        protected void btnSaveOutput_Click(object sender, EventArgs e)
        {
            int i = 0;

            objProjectBO              = new ComProjectBO();
            objProjectBO.ProjectId    = Session["projectId"].ToInt32();
            objProjectBO.FiscalYearId = Session["fiscal_year_id"].ToInt32();
            objProjectBO.ModifiedDate = DateTime.Now;
            objProjectBO.ModifiedBy   = Session["username"].ToString();
            //To clear project pratifal
            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            i = wbs.ClearProjectPratifal(objProjectBO);
            TextBox      txtOrder               = new TextBox();
            TextBox      txtOutput              = new TextBox();
            DropDownList ddlUnit                = new DropDownList();
            TextBox      txtYearlyTarget        = new TextBox();
            TextBox      txtFirstQuarterTarget  = new TextBox();
            TextBox      txtSecondQuarterTarget = new TextBox();
            TextBox      txtThirdQuarterTarget  = new TextBox();
            TextBox      txtOutputRemarks       = new TextBox();
            int          k = 0;

            foreach (RepeaterItem rptItem in rptOutput.Items)
            {
                txtOrder               = (TextBox)rptItem.FindControl("txtOrder");
                txtOutput              = (TextBox)rptItem.FindControl("txtOutput");
                txtYearlyTarget        = (TextBox)rptItem.FindControl("txtYearlyTarget");
                ddlUnit                = (DropDownList)rptItem.FindControl("ddlUnit");
                txtFirstQuarterTarget  = (TextBox)rptItem.FindControl("txtFirstQuarterTarget");
                txtSecondQuarterTarget = (TextBox)rptItem.FindControl("txtSecondQuarterTarget");
                txtThirdQuarterTarget  = (TextBox)rptItem.FindControl("txtThirdQuarterTarget");
                txtOutputRemarks       = (TextBox)rptItem.FindControl("txtOutputRemarks");
                //objProjectBO.Order=txtOrder.Text;
                objProjectBO.Output              = txtOutput.Text;
                objProjectBO.UnitId              = ddlUnit.SelectedValue.ToInt32();
                objProjectBO.YearlyTarget        = txtYearlyTarget.Text.ToDecimal();
                objProjectBO.FirstQuarterTarget  = txtFirstQuarterTarget.Text.ToDecimal();
                objProjectBO.SecondQuarterTarget = txtSecondQuarterTarget.Text.ToDecimal();
                objProjectBO.ThirdQuarterTarget  = txtThirdQuarterTarget.Text.ToDecimal();
                objProjectBO.OutputRemarks       = txtOutputRemarks.Text;
                objProjectBO.Order = txtOrder.Text.ToInt32();
                //if (txtYearlyTarget.Text.ToDecimal() != txtFirstQuarterTarget.Text.ToDecimal() + txtSecondQuarterTarget.Text.ToDecimal() + txtThirdQuarterTarget.Text.ToDecimal())
                //{
                //    Response.Write("alert('तीन वटा चौमासिक लक्ष्यको योग वार्षिक लक्ष्य बराबर हुनुपर्दछ।')");
                //    txtYearlyTarget.Focus();
                //}
                //else
                //{
                //    wbs = new ProjectService();
                //    wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                //    k = wbs.SaveProjectPratifal(objProjectBO);
                //}

                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                k = wbs.SaveProjectPratifal(objProjectBO);
            }
            if (k > 0)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect",
                                                    "alert('इन्ट्री सफल भएको छ।'); window.location='" +
                                                    Constants.ConstantAppPath + "/Modules/OutputTargetManagement/AddProjectOutput.aspx" + "';", true);
                // Response.Redirect(Constants.ConstantAppPath + "/Modules/BarsikKaryekram/ListProjectBarshikKaryakram.aspx");
            }
            else
            {
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect",
                                                        "alert('इन्ट्री सफल भएन। कृपया पुन: प्रयास गर्नुहोला।'); window.location='" +
                                                        Constants.ConstantAppPath + "/Modules/OutputTargetManagement/AddProjectOutput.aspx" + "';", true);
                    // Response.Redirect(Constants.ConstantAppPath + "/Modules/BarsikKaryekram/ListProjectBarshikKaryakram.aspx");
                }
            }
        }
コード例 #29
0
        protected void btnAddEditProject_Click(object sender, EventArgs e)
        {
            objProjectBO          = new ComProjectBO();
            objProjectBO.UserId   = Session["user_id"].ToInt32();
            objProjectBO.OfficeId = Session["office_id"].ToInt32();

            int i = 0;

            objProjectBO.BudgetHeadId        = ddlBudgetHead.SelectedValue.ToInt32();
            objProjectBO.AyojanaEngName      = txtAyojanaEngName.Text;
            objProjectBO.AjojanaNepName      = txtAyojanaNepName.Text;
            objProjectBO.AyojanaLakshya      = txtAyojanaLakshya.Text;
            objProjectBO.AyojanaUdeshya      = txtAyojanaUdeshya.Text;
            objProjectBO.AyojanaPratifal     = txtAyojanaPratifal.Text;
            objProjectBO.AyojanaKriyakalap   = txtAyojanaKriyakalap.Text;
            objProjectBO.KaryakramPrakar     = rblKaryakramPrakar.SelectedValue.ToInt32();
            objProjectBO.SuruMiti            = txtSuruMiti.Text;
            objProjectBO.AyojanaSampannaMiti = txtAyojanaSampannaMiti.Text;
            objProjectBO.Sector     = ddlSector.SelectedValue.ToInt32();
            objProjectBO.SubSector  = hidSubSector.Value.ToInt32();
            objProjectBO.Rananiti   = hidRananiti.Value.ToInt32();
            objProjectBO.Karyaniti1 = hidKaryaniti1.Value.ToInt32();
            objProjectBO.Karyaniti2 = hidKaryaniti2.Value.ToInt32();
            objProjectBO.Karyaniti3 = hidKaryaniti3.Value.ToInt32();
            if (rbdSahaSrabdiDigo.SelectedValue == "1")
            {
                //sahashrabdi selected
                objProjectBO.SahasrabdiOrDigo        = 1;
                objProjectBO.SahasabdiBikashGantabya = hidSahasabdiBikashGantabya.Value.ToInt32();
                objProjectBO.SahasabdiBikashSuchak   = hidSahasabdiBikashSuchak.Value.ToInt32();
                objProjectBO.SahasabdiBikashLakshya  = ddlSahasabdiBikashLakshya.SelectedValue.ToInt32();

                /*objProjectBO.DigoBikashGantabya = 0;
                 * objProjectBO.DigoBikashSuchak = 0;
                 * objProjectBO.DigoBikashLakshya = 0;*/
            }
            else
            {
                //digo selected
                objProjectBO.SahasrabdiOrDigo   = 2;
                objProjectBO.DigoBikashGantabya = hidDigoBikashGantavya.Value.ToInt32();
                objProjectBO.DigoBikashSuchak   = hidDigoBikashSuchak.Value.ToInt32();
                objProjectBO.DigoBikashLakshya  = ddlDigoBikashLakshya.SelectedValue.ToInt32();

                /*objProjectBO.SahasabdiBikashGantabya = 0;
                 * objProjectBO.SahasabdiBikashSuchak = 0;
                 * objProjectBO.SahasabdiBikashLakshya = 0;*/
            }

            objProjectBO.GaribiSankhet  = rbdGaribiSankhet.SelectedValue.ToInt32();
            objProjectBO.LaingikSankhet = rbdLaingikSankhet.SelectedValue.ToInt32();
            objProjectBO.FiscalYearId   = Session["fiscal_year_id"].ToInt32();
            objProjectBO.ModifiedBy     = Session["username"].ToString();
            objProjectBO.ModifiedDate   = DateTime.Now;
            if (Session["projectId"].ToInt32() > 0)
            {
                objProjectBO.ProjectId = Session["projectId"].ToInt32();
                objProjectBO.Mode      = "U";
            }
            else
            {
                objProjectBO.Mode = "I";
            }
            string ayojanaKishim = string.Empty;

            foreach (ListItem it in chkAyojanaKisim.Items)
            {
                if (it.Selected)
                {
                    ayojanaKishim += it.Value + ",";
                }
            }

            objProjectBO.AyojanaKishim    = ayojanaKishim;
            objProjectBO.Priority         = rbdMadhyaKharchaYojana.SelectedValue.ToInt32();
            objProjectBO.AyojanaLagat     = txtAyojanaLagat.Text.ToDecimal();
            objProjectBO.KaryanayanNikay  = txtKaryanayanNikaya.Text;
            objProjectBO.JalvayuSanket    = rbdJalBayuSanket.SelectedValue.ToInt32();
            objProjectBO.YojanaRananitiNo = rbdYojanaRananiti.SelectedValue.ToInt32();
            objProjectBO.IsLocked         = 0;
            if (chkEnable.Checked)
            {
                objProjectBO.IsEnable = 1;
            }
            else
            {
                objProjectBO.IsEnable = 0;
            }

            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            DataTable dt = null;

            dt = wbs.GetBudgetOrganizationMapDetails(ddlBudgetHead.SelectedValue.ToInt32());
            objProjectBO.MinistryId = dt.Rows[0]["Ministry_Id"].ToInt32();

            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();

            // int i is the project id here
            i = wbs.AddEditProject(objProjectBO);
            if (i > 0)
            {
                int j = 0;
                //To clear project sansodhan
                objProjectBO           = new ComProjectBO();
                objProjectBO.ProjectId = i;
                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                j = wbs.ClearProjectSansodhan(objProjectBO);

                TextBox txtSansodhanDate = new TextBox();
                foreach (RepeaterItem rptItem in rptSansodhan.Items)
                {
                    int k = 0;
                    txtSansodhanDate           = (TextBox)rptItem.FindControl("txtSansodhanDate");
                    objProjectBO               = new ComProjectBO();
                    objProjectBO.ProjectId     = i;
                    objProjectBO.SansodhanDate = txtSansodhanDate.Text;
                    wbs = new ProjectService();
                    wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                    k = wbs.SaveProjectSansodhan(objProjectBO);
                }
                Response.Write("<script>alert('Project Details added successfully!')</script>");
                SecureQueryString str = new SecureQueryString();
                str["id"] = i.ToString();
                Response.Redirect(Constants.ConstantAppPath + "/Modules/ProjectManagement/AddEditProjectCostingTiming.aspx" + str.EncryptedString);
            }
            else
            {
                Response.Write("<script>alert('Project Details addition failed!')</script>");
            }
        }
コード例 #30
0
        protected void btnAddAdminDetails_Click(object sender, EventArgs e)
        {
            int i = 0;

            objProjectBO                        = new ComProjectBO();
            objProjectBO.ProjectId              = Session["projectId"].ToInt32();
            objProjectBO.ExistingJanashakti     = rbdExistingJanashakti.SelectedValue.ToInt32();
            objProjectBO.ThapJanashakti         = txtThapJanashakti.Text.ToInt32();
            objProjectBO.MinistryRaaya          = txtMinistryRaaya.Text;
            objProjectBO.ChuttayiyekoRakam      = txtChuttayiyekoRakam.Text.ToDecimal();
            objProjectBO.DaatriBibaran          = txtDaatriBibaran.Text;
            objProjectBO.NepalSarkarBibaran     = txtNepalSarkarBibaran.Text;
            objProjectBO.MantralayaBibaran      = txtMantralayaBibaran.Text;
            objProjectBO.PhaseOutPlan           = txtPhaseOutPlan.Text;
            objProjectBO.ThapJanashaktiKaifiyat = txtJanaShaktiKaifiyat.Text;
            DataTable dt = (DataTable)Session["dt"];

            if (dt != null && dt.Rows.Count > 0)
            {
                objProjectBO.Mode = "U";
            }
            else
            {
                objProjectBO.Mode = "I";
            }
            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            i = wbs.SaveAdminDetails(objProjectBO);
            if (i > 0)
            {
                int j = 0;
                //To clear project bhautik samagri
                objProjectBO           = new ComProjectBO();
                objProjectBO.ProjectId = Session["projectId"].ToInt32();
                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                wbs.ClearBhautikSamagri(objProjectBO);

                TextBox      txtBhautikSamagri  = new TextBox();
                DropDownList ddlUnit            = new DropDownList();
                TextBox      txtQuantity        = new TextBox();
                TextBox      txtAnumanitRakam   = new TextBox();
                TextBox      txtSamagriKaifiyat = new TextBox();
                foreach (RepeaterItem rptItem in rptBhautikSamagri.Items)
                {
                    int k = 0;
                    txtBhautikSamagri            = (TextBox)rptItem.FindControl("txtItemName");
                    ddlUnit                      = (DropDownList)rptItem.FindControl("ddlUnit");
                    txtQuantity                  = (TextBox)rptItem.FindControl("txtQuantity");
                    txtAnumanitRakam             = (TextBox)rptItem.FindControl("txtAnumanitRakam");
                    txtSamagriKaifiyat           = (TextBox)rptItem.FindControl("txtSamagriKaifiyat");
                    objProjectBO                 = new ComProjectBO();
                    objProjectBO.ProjectId       = Session["projectId"].ToInt32();
                    objProjectBO.BhautikSamagri  = txtBhautikSamagri.Text;
                    objProjectBO.UnitId          = ddlUnit.SelectedValue.ToInt32();
                    objProjectBO.Quantity        = txtQuantity.Text.ToDecimal();
                    objProjectBO.AnumanitRakam   = txtAnumanitRakam.Text.ToDecimal();
                    objProjectBO.SamagriKaifiyat = txtSamagriKaifiyat.Text;
                    wbs = new ProjectService();
                    wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                    k = wbs.SaveBhautikSamagri(objProjectBO);
                }
                Response.Write("<script>alert('Project administrative details added successfully!')</script>");
                SecureQueryString str = new SecureQueryString();
                str["id"] = Session["projectId"].ToString();
                Response.Redirect(Constants.ConstantAppPath + "/Modules/ProjectManagement/AddEditProjectOtherDetails.aspx" + str.EncryptedString);
            }
            else
            {
                Response.Write("<script>alert('Project other details addition failed!')</script>");
            }
        }