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, "--आयोजना छान्नुहोस्--");
            }
        }
Exemplo n.º 2
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, "--छान्नुहोस्--");
            }
        }
Exemplo n.º 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>");
            }
        }
Exemplo n.º 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>");
                }
            }
        }
        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>");
            }
        }
Exemplo n.º 6
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();
                }
            }
        }
Exemplo n.º 7
0
        protected void btnView_Click(object sender, EventArgs e)
        {
            lvRananiti.DataSource = null;
            lvRananiti.DataBind();

            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            dtRananitiDetail    = wbs.PopulateAllRananitiBySubSectorId(ddlSubSector.SelectedValue.ToInt32(), Session["LanguageSetting"].ToString());
            if (dtRananitiDetail != null && dtRananitiDetail.Rows.Count > 0)
            {
                lvRananiti.DataSource = dtRananitiDetail;
                lvRananiti.DataBind();
            }
        }
Exemplo n.º 8
0
        private void PopulateKaryanitiDetails(int karyanitiId)
        {
            ProjectService objWebService      = new ProjectService();
            DataTable      dtKaryanitiDetails = null;

            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            dtKaryanitiDetails            = objWebService.PopulateKaryanitiDetails(karyanitiId);
            if (dtKaryanitiDetails != null && dtKaryanitiDetails.Rows.Count > 0)
            {
                ddlRananiti.SelectedValue    = dtKaryanitiDetails.Rows[0]["RANANITI_ID"].ToString();
                txtKaryanitiEnglishName.Text = dtKaryanitiDetails.Rows[0]["KARYANITI_ENG_NAME"].ToString();
                txtKaryanitiNepaliName.Text  = dtKaryanitiDetails.Rows[0]["KARYANITI_NEP_NAME"].ToString();
            }
        }
Exemplo n.º 9
0
        protected void ddlRananiti_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataTable dtKaryaniti = null;
            int       rananitiId  = ddlRananiti.SelectedValue.ToInt32();

            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            dtKaryaniti         = wbs.PopulateAllKaryaniti(rananitiId, Session["LanguageSetting"].ToString());
            if (dtKaryaniti != null && dtKaryaniti.Rows.Count > 0)
            {
                lvKaryaniti.DataSource = dtKaryaniti;
                lvKaryaniti.DataBind();
            }
        }
Exemplo n.º 10
0
        private void PopulateAllRananiti()
        {
            DataTable dtRananiti = null;

            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            dtRananiti          = wbs.PopulateAllRananiti(Session["LanguageSetting"].ToString());
            if (dtRananiti != null && dtRananiti.Rows.Count > 0)
            {
                ddlRananiti.DataSource     = dtRananiti;
                ddlRananiti.DataValueField = "RANANITI_ID";
                ddlRananiti.DataTextField  = "RANANITI_NAME";
                ddlRananiti.DataBind();
                ddlRananiti.Items.Insert(0, "--छान्नुहोस्--");
            }
        }
Exemplo n.º 11
0
        private void PopulateRananitiDetails(int rananitiId)
        {
            ProjectService objWebService     = new ProjectService();
            DataTable      dtRananitiDetails = null;

            objWebService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            dtRananitiDetails             = objWebService.PopulateRananitiDetails(rananitiId);
            if (dtRananitiDetails != null && dtRananitiDetails.Rows.Count > 0)
            {
                ddlSector.SelectedValue = dtRananitiDetails.Rows[0]["ACTIVITY_SECTOR_ID"].ToString();
                PopulateSubSector(ddlSector.SelectedValue.ToInt32());
                ddlSubSector.SelectedValue  = dtRananitiDetails.Rows[0]["SUB_SECTOR_ID"].ToString();
                hidSubSector.Value          = ddlSubSector.SelectedValue;
                txtRananitiEnglishName.Text = dtRananitiDetails.Rows[0]["RANANITI_ENG_NAME"].ToString();
                txtRananitiNepaliName.Text  = dtRananitiDetails.Rows[0]["RANANITI_NEP_NAME"].ToString();
            }
        }
        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;
            }
        }
        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);
            }
        }
Exemplo n.º 14
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();
            }
        }
        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();
            }
        }
        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, "--छान्नुहोस्--");
            }
        }
        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, "--छान्नुहोस्--");
            }
        }
        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);
        }
        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;
            }
        }
        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();
            }
        }
        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");
                }
            }
        }
Exemplo n.º 23
0
        protected void LoadReport(int prjlId, ReportDocument repDoc)
        {
            //repDoc = new ReportDocument();

            objProjectBO           = new ComProjectBO();
            objProjectBO.ProjectId = prjlId.ToInt32();


            wbs = new ProjectService();
            wbs.AuthSoapHdValue        = ServiceAuth.ServiceAuthenticationProject();
            Session["dtProjectDetail"] = wbs.PopulateProjectListRpt(objProjectBO);
            DataTable dtProjectDetail = (DataTable)Session["dtProjectDetail"];

            if (dtProjectDetail != null && dtProjectDetail.Rows.Count > 0)
            {
                lnkVerify.Visible = true;
                //objPlanRpt = new PlanListRpt();
                objRptFactory = new ReportFactory();
                objRptFactory.SetReport(repDoc);


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

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

                //cryParameter(repDoc);

                if (dtProjectDetail != null && dtProjectDetail.Rows.Count > 0)
                {
                    tabviewer.ReportSource   = repDoc;
                    Session["ProjectReport"] = repDoc;
                }
                else
                {
                    tabviewer.ReportSource   = null;
                    Session["ProjectReport"] = null;
                }

                //tabviewer.ReportSource = repDoc;

                //chartViewer.ReportSource = objPrjBhautikPragatiGrpRpt;



                // crystalViewer.Zoom(75);
                //chartViewer.Zoom(93);
            }

            else
            {
                //objRptFactory = new ReportFactory();
                //objRptFactory.SetReport(repDoc);


                //objRptServices = new ReportServices();
                //objRptServices.GetReport(repDoc, tabviewer);

                //repDoc.Database.Tables[0].SetDataSource(dtProjectDetail);
                //cryParameter(repDoc);
                //tabviewer.ReportSource = repDoc;
            }
        }
Exemplo n.º 24
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>");
            }
        }
        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/ProjectManagement/AddEditProject.aspx" + str.EncryptedString);
            }
            else if (e.CommandName == "delete")
            {
                int i = 0;
                projectId              = int.Parse(e.CommandArgument.ToString());
                objProjectBO           = new ComProjectBO();
                objProjectBO.ProjectId = projectId;
                objProjectBO.Mode      = "D";
                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                i = wbs.AddEditProject(objProjectBO);
                if (i > 0)
                {
                    Response.Redirect(Constants.ConstantAppPath + "/Modules/ProjectManagement/ProjectList.aspx");
                }
                else
                {
                    Response.Write("<script>alert('Delete failed')</script>");
                }
            }
            else if (e.CommandName == "lock")
            {
                int i = 0;
                projectId              = int.Parse(e.CommandArgument.ToString());
                objProjectBO           = new ComProjectBO();
                objProjectBO.ProjectId = projectId;
                objProjectBO.Mode      = "L";
                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                i = wbs.AddEditProject(objProjectBO);
                if (i > 0)
                {
                    PopulateProjects(ddlBudgetHead.SelectedValue.ToInt32());
                }
                //Response.Redirect(Constants.ConstantAppPath + "/Modules/ProjectManagement/ProjectList.aspx");
                else
                {
                    Response.Write("<script>alert('Lock failed')</script>");
                }
            }
            else if (e.CommandName == "unlock")
            {
                int i = 0;
                projectId              = int.Parse(e.CommandArgument.ToString());
                objProjectBO           = new ComProjectBO();
                objProjectBO.ProjectId = projectId;
                objProjectBO.Mode      = "L";
                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                i = wbs.AddEditProject(objProjectBO);
                if (i > 0)
                {
                    Response.Redirect(Constants.ConstantAppPath + "/Modules/ProjectManagement/ProjectList.aspx");
                }
                else
                {
                    Response.Write("<script>alert('Unlock failed')</script>");
                }
            }
            else if (e.CommandName == "verify")
            {
                int    i    = 0;
                string mode = string.Empty;
                projectId              = int.Parse(e.CommandArgument.ToString());
                objProjectBO           = new ComProjectBO();
                objProjectBO.ProjectId = projectId;
                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.CheckLowerLevelVerification(projectId, mode);

                if (check == 1)
                {
                    wbs = new ProjectService();
                    wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                    i = wbs.AddEditProject(objProjectBO);
                    if (i > 0)
                    {
                        Response.Redirect(Constants.ConstantAppPath + "/Modules/ProjectManagement/ProjectList.aspx");
                    }
                    else
                    {
                        Response.Write("<script>alert('Verification failed')</script>");
                    }
                }
                else
                {
                    Response.Write("<script>alert('Verification failed. Lower level verification is required.')</script>");
                }
            }
            else
            {
            }
        }
        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>");
            }
        }
        protected void btnSaveOthers_Click(object sender, EventArgs e)
        {
            int i = 0;

            objProjectBO           = new ComProjectBO();
            objProjectBO.ProjectId = Session["projectId"].ToInt32();
            //objProjectBO.Swadeshi = txtSwadeshi.Text.ToInt32();
            //objProjectBO.Bideshi = txtBideshi.Text.ToInt32();
            //objProjectBO.ThekkaSankhya = txtThekkaSankhya.Text.ToInt32();
            //objProjectBO.ThekkaRakam = txtThekkaRakam.Text.ToDecimal();
            if (chkIsUsable.Checked == true)
            {
                objProjectBO.LavanbitMahila    = txtLavanbitMahila.Text.ToInt32();
                objProjectBO.LavanbitBalBalika = txtLavanbitBalBalika.Text.ToInt32();
                objProjectBO.LavanbitJanajati  = txtLavanbitJanajati.Text.ToInt32();
                objProjectBO.LavanbitDalit     = txtLavanbitDalit.Text.ToInt32();
                objProjectBO.LavanbitMadheshi  = txtLavanbitMadhesi.Text.ToInt32();
                objProjectBO.LavanbitMuslim    = txtLavanbitMuslim.Text.ToInt32();
                objProjectBO.Anya = txtAnya.Text.ToInt32();
                objProjectBO.LavanbitMahilaKaifiyat    = txtLavanbitMahilaKaifiyat.Text;
                objProjectBO.LavanbitBalBalikaKaifiyat = txtLavanbitBalKaifiyat.Text;
                objProjectBO.LavanbitJanajatiKaifiyat  = txtLavanbitJanaKaifiyat.Text;
                objProjectBO.LavanbitDalitKaifiyat     = txtLavanbitDalitKaifiyat.Text;
                objProjectBO.LavanbitMadhesiKaifiyat   = txtLavanbitMadhesiKaifiyat.Text;
                objProjectBO.LavanbitMuslimKaifiyat    = txtLavanbitMuslimKaifiyat.Text;
                objProjectBO.LavanbitAnyaKaifiyat      = txtAnyaKaifiyat.Text;
                objProjectBO.Shramdin = txtShramDin.Text.ToInt32();
                objProjectBO.Parimaan = txtParimaan.Text.ToDecimal();
                objProjectBO.Yogdan   = txtYogdan.Text;
            }
            else
            {
                objProjectBO.LavanbitMahila    = 0;
                objProjectBO.LavanbitBalBalika = 0;
                objProjectBO.LavanbitJanajati  = 0;
                objProjectBO.LavanbitDalit     = 0;
                objProjectBO.LavanbitMadheshi  = 0;
                objProjectBO.LavanbitMuslim    = 0;
                objProjectBO.Anya = 0;
                objProjectBO.LavanbitMahilaKaifiyat    = "";
                objProjectBO.LavanbitBalBalikaKaifiyat = "";
                objProjectBO.LavanbitJanajatiKaifiyat  = "";
                objProjectBO.LavanbitDalitKaifiyat     = "";
                objProjectBO.LavanbitMadhesiKaifiyat   = "";
                objProjectBO.LavanbitMuslimKaifiyat    = "";
                objProjectBO.LavanbitAnyaKaifiyat      = "";
                objProjectBO.Shramdin = 0;
                objProjectBO.Parimaan = 0;
                objProjectBO.Yogdan   = "";
            }

            if (chkIsUsable.Checked == true)
            {
                objProjectBO.IsUsable = 1;
            }
            else
            {
                objProjectBO.IsUsable = 0;
            }
            objProjectBO.JaggaPrapti     = txtJaggaPrapti.Text.ToDecimal();
            objProjectBO.JaggaPraptiUnit = ddlJaggaPraptiUnit.SelectedValue.ToInt32();
            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.SaveOtherDetails(objProjectBO);
            if (i > 0)
            {
                int j = 0;
                //To clear project paramarsha bibaran
                objProjectBO           = new ComProjectBO();
                objProjectBO.ProjectId = Session["projectId"].ToInt32();
                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                j = wbs.ClearParamarshaDetails(objProjectBO);
                DropDownList ddlFiscalYear    = new DropDownList();
                TextBox      txtRakamSwadeshi = new TextBox();
                TextBox      txtRakamBideshi  = new TextBox();
                foreach (RepeaterItem rptItem in rptParamarsaBibaran.Items)
                {
                    int k = 0;
                    ddlFiscalYear              = (DropDownList)rptItem.FindControl("ddlAaba");
                    txtRakamBideshi            = (TextBox)rptItem.FindControl("txtRakamBideshi");
                    txtRakamSwadeshi           = (TextBox)rptItem.FindControl("txtRakamSwadeshi");
                    objProjectBO               = new ComProjectBO();
                    objProjectBO.ProjectId     = Session["projectId"].ToInt32();
                    objProjectBO.FiscalYearId  = ddlFiscalYear.SelectedValue.ToInt32();
                    objProjectBO.RakamBideshi  = txtRakamBideshi.Text.ToDecimal();
                    objProjectBO.RakamSwadeshi = txtRakamSwadeshi.Text.ToDecimal();

                    wbs = new ProjectService();
                    wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                    k = wbs.SaveParamarshaBibaran(objProjectBO);
                }


                int m = 0;
                //To clear project paramarsha sankhya
                objProjectBO           = new ComProjectBO();
                objProjectBO.ProjectId = Session["projectId"].ToInt32();
                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                m = wbs.ClearParamarshaSankhya(objProjectBO);

                DropDownList ddlFiscalYearPS     = new DropDownList();
                TextBox      txtSwadeshiSankhya  = new TextBox();
                TextBox      txtSwadeshiShramDin = new TextBox();
                TextBox      txtBideshiSankhya   = new TextBox();
                TextBox      txtBideshiShramDin  = new TextBox();

                foreach (RepeaterItem rptItem in rptParamarshaSankhya.Items)
                {
                    int k = 0;
                    ddlFiscalYearPS               = (DropDownList)rptItem.FindControl("ddlAaba");
                    txtSwadeshiSankhya            = (TextBox)rptItem.FindControl("txtSwadeshiSankhya");
                    txtSwadeshiShramDin           = (TextBox)rptItem.FindControl("txtSwadeshiShramDin");
                    txtBideshiSankhya             = (TextBox)rptItem.FindControl("txtBideshiSankhya");
                    txtBideshiShramDin            = (TextBox)rptItem.FindControl("txtBideshiShramDin");
                    objProjectBO                  = new ComProjectBO();
                    objProjectBO.ProjectId        = Session["projectId"].ToInt32();
                    objProjectBO.FiscalYearId     = ddlFiscalYearPS.SelectedValue.ToInt32();
                    objProjectBO.Swadeshi         = txtSwadeshiSankhya.Text.ToInt32();
                    objProjectBO.Bideshi          = txtBideshiSankhya.Text.ToInt32();
                    objProjectBO.SwadeshiShramDin = txtSwadeshiShramDin.Text.ToDecimal();
                    objProjectBO.BideshiShramDin  = txtBideshiShramDin.Text.ToDecimal();

                    wbs = new ProjectService();
                    wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                    k = wbs.SaveParamarshaSankhya(objProjectBO);
                }


                //To clear project thekka sankhya
                objProjectBO           = new ComProjectBO();
                objProjectBO.ProjectId = Session["projectId"].ToInt32();
                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                j = wbs.ClearProjectThekkaSankhya(objProjectBO);

                DropDownList ddlFiscalYearA    = new DropDownList();
                TextBox      txtThekkaSankhyaA = new TextBox();
                TextBox      txtThekkaRakamA   = new TextBox();

                foreach (RepeaterItem rptItem in rptThekkaSankhyaRakam.Items)
                {
                    int k = 0;
                    ddlFiscalYearA             = (DropDownList)rptItem.FindControl("ddlAaba");
                    txtThekkaSankhyaA          = (TextBox)rptItem.FindControl("txtThekkaSankhya");
                    txtThekkaRakamA            = (TextBox)rptItem.FindControl("txtThekkaRakam");
                    objProjectBO               = new ComProjectBO();
                    objProjectBO.ProjectId     = Session["projectId"].ToInt32();
                    objProjectBO.FiscalYearId  = ddlFiscalYearA.SelectedValue.ToInt32();
                    objProjectBO.ThekkaSankhya = txtThekkaSankhyaA.Text.ToInt32();
                    objProjectBO.ThekkaRakam   = txtThekkaRakamA.Text.ToDecimal();

                    wbs = new ProjectService();
                    wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                    k = wbs.SaveProjectThekkaSankhya(objProjectBO);
                }

                //To clear project Aayojana pramukh
                objProjectBO           = new ComProjectBO();
                objProjectBO.ProjectId = Session["projectId"].ToInt32();
                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                wbs.ClearAayojanaPramukh(objProjectBO);

                TextBox txtPramukhStartDate = new TextBox();
                TextBox txtPramukhName      = new TextBox();

                foreach (RepeaterItem rptItem in rptAayojanaPramukh.Items)
                {
                    txtPramukhStartDate = (TextBox)rptItem.FindControl("txtPramukhStartDate");
                    txtPramukhName      = (TextBox)rptItem.FindControl("txtPramukhName");

                    objProjectBO                  = new ComProjectBO();
                    objProjectBO.ProjectId        = Session["projectId"].ToInt32();
                    objProjectBO.PramukhStartDate = txtPramukhStartDate.Text;
                    objProjectBO.PramukhName      = txtPramukhName.Text;

                    wbs = new ProjectService();
                    wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                    wbs.SaveAayojanaPramukh(objProjectBO);
                }
                Response.Write("<script>alert('Project details added successfully!')</script>");
                Response.Redirect(Constants.ConstantAppPath + "/Modules/ProjectManagement/ProjectList.aspx");
            }
            else
            {
                Response.Write("<script>alert('Project  details addition failed!')</script>");
            }
        }
        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();
                }
            }
        }
        /*protected void ddlProject_SelectedIndexChanged(object sender, EventArgs e)
         * {
         *  rptParamarsaBibaran.DataSource = null;
         *  rptParamarsaBibaran.DataBind();
         *  PopulateOtherDetails(ddlBudgetHead.SelectedValue.ToInt32(), ddlProject.SelectedValue.ToInt32());
         * }*/

        private void PopulateOtherDetails(int projectId)
        {
            DataTable dtParamasrhaBibaran = null;

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

            if (dt != null && dt.Rows.Count > 0)
            {
                //txtSwadeshi.Text = dt.Rows[0]["SWADESHI"].ToString();
                //txtBideshi.Text = dt.Rows[0]["BIDESHI"].ToString();
                //txtThekkaSankhya.Text = dt.Rows[0]["THEKKA_SANKHYA"].ToString();
                //txtThekkaRakam.Text = dt.Rows[0]["THEKKA_RAKAM"].ToString();
                txtLavanbitMahila.Text    = dt.Rows[0]["LAVANBIT_MAHILA"].ToString();
                txtLavanbitBalBalika.Text = dt.Rows[0]["LAVANBIT_BALBALIKA"].ToString();
                txtLavanbitDalit.Text     = dt.Rows[0]["LAVANBIT_DALIT"].ToString();
                txtLavanbitMadhesi.Text   = dt.Rows[0]["LAVANBIT_MADHESI"].ToString();
                txtLavanbitJanajati.Text  = dt.Rows[0]["LAVANBIT_JANAJATI"].ToString();
                txtLavanbitMuslim.Text    = dt.Rows[0]["LAVANBIT_MUSLIM"].ToString();
                txtAnya.Text = dt.Rows[0]["ANYA"].ToString();

                if (dt.Rows[0]["IS_USABLE"].ToString() == "1")
                {
                    chkIsUsable.Checked = true;
                }
                else
                {
                    chkIsUsable.Checked = false;
                }

                txtLavanbitMahilaKaifiyat.Text  = dt.Rows[0]["LAVANBIT_MAHILA_KAIFIYAT"].ToString();
                txtLavanbitBalKaifiyat.Text     = dt.Rows[0]["LAVANBIT_BALBALIKA_KAIFIYAT"].ToString();
                txtLavanbitDalitKaifiyat.Text   = dt.Rows[0]["LAVANBIT_DALIT_KAIFIYAT"].ToString();
                txtLavanbitMadhesiKaifiyat.Text = dt.Rows[0]["LAVANBIT_JANAJATI_KAIFIYAT"].ToString();
                txtLavanbitJanaKaifiyat.Text    = dt.Rows[0]["LAVANBIT_MADHESI_KAIFIYAT"].ToString();
                txtLavanbitMuslimKaifiyat.Text  = dt.Rows[0]["LAVANBIT_MUSLIM_KAIFIYAT"].ToString();
                txtAnyaKaifiyat.Text            = dt.Rows[0]["ANYA_KAIFIYAT"].ToString();

                txtShramDin.Text    = dt.Rows[0]["SHRAMDIN"].ToString();
                txtParimaan.Text    = dt.Rows[0]["PARIMAAN"].ToString();
                txtYogdan.Text      = dt.Rows[0]["YOGDAN"].ToString();
                txtJaggaPrapti.Text = dt.Rows[0]["JAGGA_PRAPTI"].ToString();
                ddlJaggaPraptiUnit.SelectedValue = dt.Rows[0]["JAGGA_PRAPTI_UNIT"].ToString();
                dtParamarsaBibaran = wbs.PopulateParamarshaBibaran(objProjectBO);
                dtA = dtParamarsaBibaran;
                if (dtParamarsaBibaran != null && dtParamarsaBibaran.Rows.Count > 0)
                {
                    rptParamarsaBibaran.DataSource = dtParamarsaBibaran;
                    rptParamarsaBibaran.DataBind();
                    foreach (RepeaterItem rptItem in rptParamarsaBibaran.Items)
                    {
                        DropDownList ddlFiscalYear    = new DropDownList();
                        TextBox      txtRakamSwadeshi = new TextBox();
                        TextBox      txtRakamBideshi  = new TextBox();

                        ddlFiscalYear    = (DropDownList)rptItem.FindControl("ddlAaba");
                        txtRakamBideshi  = (TextBox)rptItem.FindControl("txtRakamBideshi");
                        txtRakamSwadeshi = (TextBox)rptItem.FindControl("txtRakamSwadeshi");
                    }
                }
                else
                {
                    dtA.Clear();
                    DataRow drB = dtA.NewRow();
                    drB["FISCAL_YEAR_ID"] = 0;
                    drB["RAKAM_SWADESHI"] = 0.0;
                    drB["RAKAM_BIDESHI"]  = 0.0;
                    dtA.Rows.Add(drB);
                    rptParamarsaBibaran.DataSource = dtA;
                    rptParamarsaBibaran.DataBind();
                }


                dtParamarshaSankhya = wbs.PopulateParamarshaSankhya(objProjectBO);
                dtAPS = dtParamarshaSankhya;
                if (dtParamarshaSankhya != null && dtParamarshaSankhya.Rows.Count > 0)
                {
                    rptParamarshaSankhya.DataSource = dtParamarshaSankhya;
                    rptParamarshaSankhya.DataBind();
                    foreach (RepeaterItem rptItem in rptParamarshaSankhya.Items)
                    {
                        DropDownList ddlFiscalYear      = new DropDownList();
                        TextBox      txtSwadeshiSankhya = new TextBox();
                        TextBox      txtBideshiSankhya  = new TextBox();

                        ddlFiscalYear      = (DropDownList)rptItem.FindControl("ddlAaba");
                        txtSwadeshiSankhya = (TextBox)rptItem.FindControl("txtSwadeshiSankhya");
                        txtBideshiSankhya  = (TextBox)rptItem.FindControl("txtBideshiSankhya");
                    }
                }
                else
                {
                    dtAPS.Clear();
                    DataRow drB = dtAPS.NewRow();
                    drB["FISCAL_YEAR_ID"]     = 0;
                    drB["SWADESHI"]           = 0;
                    drB["BIDESHI"]            = 0;
                    drB["SWADESHI_SHRAM_DIN"] = 0;
                    drB["BIDESHI_SHRAM_DIN"]  = 0;
                    dtAPS.Rows.Add(drB);
                    rptParamarshaSankhya.DataSource = dtAPS;
                    rptParamarshaSankhya.DataBind();
                }


                dtThekkaSankhyaRakam = wbs.PopulateThekkaSankhyaRakam(objProjectBO);
                dtAT = dtThekkaSankhyaRakam;
                if (dtThekkaSankhyaRakam != null && dtThekkaSankhyaRakam.Rows.Count > 0)
                {
                    rptThekkaSankhyaRakam.DataSource = dtThekkaSankhyaRakam;
                    rptThekkaSankhyaRakam.DataBind();
                    foreach (RepeaterItem rptItem in rptThekkaSankhyaRakam.Items)
                    {
                        DropDownList ddlFiscalYear     = new DropDownList();
                        TextBox      txtThekkaSankhyaA = new TextBox();
                        TextBox      txtThekkaRakamA   = new TextBox();

                        ddlFiscalYear     = (DropDownList)rptItem.FindControl("ddlAaba");
                        txtThekkaSankhyaA = (TextBox)rptItem.FindControl("txtThekkaSankhya");
                        txtThekkaRakamA   = (TextBox)rptItem.FindControl("txtThekkaRakam");
                    }
                }
                else
                {
                    dtAT.Clear();
                    DataRow drB = dtAT.NewRow();
                    drB["FISCAL_YEAR_ID"] = 0;
                    drB["THEKKA_SANKHYA"] = 0;
                    drB["THEKKA_RAKAM"]   = 0;
                    dtAT.Rows.Add(drB);
                    rptThekkaSankhyaRakam.DataSource = dtAT;
                    rptThekkaSankhyaRakam.DataBind();
                }


                wbs = new ProjectService();
                wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
                dtAayojanaPramukh   = wbs.PopulateAayojanaPramukh(objProjectBO);
                dtAP = dtAayojanaPramukh;
                if (dtAayojanaPramukh != null && dtAayojanaPramukh.Rows.Count > 0)
                {
                    rptAayojanaPramukh.DataSource = dtAayojanaPramukh;
                    rptAayojanaPramukh.DataBind();
                    foreach (RepeaterItem rptItem in rptAayojanaPramukh.Items)
                    {
                        TextBox txtPramukhStartDate = new TextBox();
                        TextBox txtPramukhName      = new TextBox();

                        txtPramukhStartDate = (TextBox)rptItem.FindControl("txtPramukhStartDate");
                        txtPramukhName      = (TextBox)rptItem.FindControl("txtPramukhName");
                    }
                }
                else
                {
                    dtAP.Clear();
                    DataRow drB = dtAP.NewRow();
                    drB["PRAMUKH_START_DATE"] = "";
                    drB["PRAMUKH_NAME"]       = "";
                    dtAP.Rows.Add(drB);
                    rptAayojanaPramukh.DataSource = dtAP;
                    rptAayojanaPramukh.DataBind();
                }
            }
        }
Exemplo n.º 30
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            ProjectBudgetDetailBO objBudgProject    = new ProjectBudgetDetailBO();
            DropDownList          ddlShrot          = new DropDownList();
            DropDownList          ddlBhuktaniPrakar = new DropDownList();
            TextBox     txtRakam        = new TextBox();
            TextBox     txtFirstTRakam  = new TextBox();
            TextBox     txtSecondTRakam = new TextBox();
            TextBox     txtThirdTRakam  = new TextBox();
            HiddenField hidBadfadId     = new HiddenField();

            foreach (RepeaterItem rptItem in rptAayojanaBadfad.Items)
            {
                int k = 0;
                ddlShrot                         = (DropDownList)rptItem.FindControl("ddlShrot");
                ddlBhuktaniPrakar                = (DropDownList)rptItem.FindControl("ddlBhuktaniPrakar");
                txtRakam                         = (TextBox)rptItem.FindControl("txtRakam");
                txtFirstTRakam                   = (TextBox)rptItem.FindControl("txtFirstTRakam");
                txtSecondTRakam                  = (TextBox)rptItem.FindControl("txtSecondTRakam");
                txtThirdTRakam                   = (TextBox)rptItem.FindControl("txtThirdTRakam");
                hidBadfadId                      = (HiddenField)rptItem.FindControl("hidBadfadId");
                objBudgProject.BadfadId          = hidBadfadId.Value.ToDecimal();
                objBudgProject.FirstTRakam       = txtFirstTRakam.Text.ToDecimal();
                objBudgProject.SecondTRakam      = txtSecondTRakam.Text.ToDecimal();
                objBudgProject.ThirdCRakam       = txtThirdTRakam.Text.ToDecimal();
                objBudgProject.FiscalYearId      = SessionHelper.SessionFiscalYear.ToInt32();
                objBudgProject.Mode              = "I";
                objBarsikService                 = new BarsikKaryekramService();
                objBarsikService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBarsikKaryekram();
                objBarsikService.InsertUpdateProjectBudgDetail(objBudgProject);
            }
            ProjectBarsikThekaParamarsaBO objThekaParamarsa = new ProjectBarsikThekaParamarsaBO();

            //barshikAnya
            ProjectBarshikAnyaBO objBarshikAnyaBo = new ProjectBarshikAnyaBO();

            objBarshikAnyaBo.ProjectId       = Session["projectId"].ToInt32();
            objBarshikAnyaBo.FiscalYearId    = Session["fiscal_year_id"].ToInt32();
            objBarshikAnyaBo.FirstRakamAnya  = txtAnyaFirst.Text.ToDecimal();
            objBarshikAnyaBo.SecondRakamAnya = txtAnyaSecond.Text.ToDecimal();
            objBarshikAnyaBo.ThirdRakamAnya  = txtAnyaThird.Text.ToDecimal();
            objBarshikAnyaBo.RemarksAnya     = txtAnyaRemarks.Text;

            objBarsikService = new BarsikKaryekramService();
            objBarsikService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBarsikKaryekram();
            if (hidBarshikAnyaId.Value == "")
            {
                objBarshikAnyaBo.Mode = "I";
            }
            else
            {
                objBarshikAnyaBo.Mode          = "U";
                objBarshikAnyaBo.BarshikAnyaID = hidBarshikAnyaId.Value.ToInt32();
            }

            //barshikBharit
            BarsikBharitBo objBarsikBharitBo = new BarsikBharitBo();

            objBarsikBharitBo.ProjectId            = Session["projectId"].ToInt32();
            objBarsikBharitBo.FiscalYearId         = Session["fiscal_year_id"].ToInt32();
            objBarsikBharitBo.BarshikBharitLakshya = txtBarshik.Text.ToDecimal();
            objBarsikBharitBo.FirstBharitLakshya   = txtFirstBharit.Text.ToDecimal();
            objBarsikBharitBo.SecondBharitLakshya  = txtSecondBharit.Text.ToDecimal();
            objBarsikBharitBo.ThirdBharitLakshya   = txtThirdBharit.Text.ToDecimal();
            if (hidBarshikBharitId.Value == "")
            {
                objBarsikBharitBo.Mode = "I";
            }
            else
            {
                objBarsikBharitBo.Mode = "U";
            }


            if (hidThekaParamarsaId.Value == "")
            {
                objThekaParamarsa.Mode = "I";
            }
            else
            {
                objThekaParamarsa.Mode           = "U";
                objThekaParamarsa.BarsikThekaPId = hidThekaParamarsaId.Value.ToDecimal();
            }

            //paramarsa swadeshi
            objThekaParamarsa.PFTSwadeshiNo    = txtPSFirstTNo.Text.ToDecimal();
            objThekaParamarsa.PFTSwadeshiRakam = txtPSFirstTRakam.Text.ToDecimal();
            objThekaParamarsa.PSTSwadeshiNo    = txtPSSecondTNo.Text.ToDecimal();
            objThekaParamarsa.PSTSwadesiRakam  = txtPSSSecondTRakam.Text.ToDecimal();
            objThekaParamarsa.PTTSwadeshiNo    = txtPSThirdTNo.Text.ToDecimal();
            objThekaParamarsa.PTTSwadeshiRakam = txtPSThirdTRakam.Text.ToDecimal();
            //pragati
            objThekaParamarsa.PFPSwadeshiNo    = 0;
            objThekaParamarsa.PFPSwadeshiRakam = 0;
            objThekaParamarsa.PSPSwadeshiNo    = 0;
            objThekaParamarsa.PSPSwadesiRakam  = 0;
            objThekaParamarsa.PTPSwadeshiNo    = 0;
            objThekaParamarsa.PTPSwadeshiRakam = 0;
            //end

            //paramarsadata bideshi
            objThekaParamarsa.PFTBideshiNo    = txtPBFirstTNo.Text.ToDecimal();
            objThekaParamarsa.PFTBideshiRakam = txtPBFirstTRakam.Text.ToDecimal();
            objThekaParamarsa.PSTBideshiNo    = txtPBSecondTNo.Text.ToDecimal();
            objThekaParamarsa.PSTBideshiRakam = txtPBSecondTRakam.Text.ToDecimal();
            objThekaParamarsa.PTTBideshiNo    = txtPBThirdTNo.Text.ToDecimal();
            objThekaParamarsa.PTTBideshiRakam = txtPBThirdTRakam.Text.ToDecimal();
            //pragati
            objThekaParamarsa.PFPBideshiNo    = 0;
            objThekaParamarsa.PFPBideshiRakam = 0;
            objThekaParamarsa.PSPBideshiNo    = 0;
            objThekaParamarsa.PSPBideshiRakam = 0;
            objThekaParamarsa.PTPBideshiNo    = 0;
            objThekaParamarsa.PTPBideshiRakam = 0;
            //end
            //
            //theka details//
            objThekaParamarsa.ThekaFTNo    = txtThekaFirstTNo.Text.ToDecimal();
            objThekaParamarsa.ThekaFTRakam = txtThekaFirstTRakam.Text.ToDecimal();
            objThekaParamarsa.ThekaSTNo    = txtThekaSecondTNO.Text.ToDecimal();
            objThekaParamarsa.ThekaSTRakam = txtThekaSecondTRakam.Text.ToDecimal();
            objThekaParamarsa.ThekaTTNo    = txtThekaThirdTNo.Text.ToDecimal();
            objThekaParamarsa.ThekaTTRakam = txtThekaThirdTRakam.Text.ToDecimal();
            //pragati
            objThekaParamarsa.ThekaFPNo    = 0;
            objThekaParamarsa.ThekaFPRakam = 0;
            objThekaParamarsa.ThekaSPNo    = 0;
            objThekaParamarsa.ThekaSPRakam = 0;
            objThekaParamarsa.ThekaTPNo    = 0;
            objThekaParamarsa.ThekaTPRakam = 0;

            //end
            objThekaParamarsa.FiscalYearId = SessionHelper.SessionFiscalYear.ToInt32();
            objThekaParamarsa.ProjectId    = Session["projectId"].ToInt32();
            objThekaParamarsa.ModifiedBy   = Session["username"].ToString();
            objThekaParamarsa.ModifiedDate = DateTime.Now;
            objBarsikService.InsertUpdateProjectBarsikThekaParamarsa(objThekaParamarsa);

            //upload multiple files
            ProjectBarsikThekaParamarsaBO objBo = new ProjectBarsikThekaParamarsaBO();

            objBarsikService = new BarsikKaryekramService();
            objBarsikService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBarsikKaryekram();

            //insert barshik anya
            int a = objBarsikService.InsertUpdateBarshikAnya(objBarshikAnyaBo);

            int b = objBarsikService.InsertUpdateBarshikBharit(objBarsikBharitBo);

            objBo.FiscalYearId = Session["fiscal_year_id"].ToInt32();
            objBo.ProjectId    = Session["projectId"].ToInt32();
            string allFiles = "";

            ///// file upload remains
            if (FileBarshikUpload.HasFile) // CHECK IF ANY FILE HAS BEEN SELECTED.
            {
                HttpFileCollection hfc = Request.Files;


                for (int f = 0; f <= hfc.Count - 1; f++)
                {
                    HttpPostedFile hpf = hfc[f];
                    if (hpf.ContentLength > 0)
                    {
                        string fileName;
                        fileName = DateTime.Now + hpf.FileName;
                        string ext            = System.IO.Path.GetExtension(hpf.FileName);
                        var    splitseparator = new string[] { ext };
                        var    result         = Splitstring(fileName, splitseparator);
                        String source         = result[0];
                        string str            = source + ext;
                        str = Regex.Replace(str, @"/", "_");
                        str = Regex.Replace(str, @":", "_");
                        str = Regex.Replace(str, @" ", "_");
                        str = Regex.Replace(str, @",", "_");
                        String newfolder = Server.MapPath("~") + @"BarshikFiles\";
                        String path      = newfolder + str;
                        hpf.SaveAs(path);
                        allFiles += str + ",";
                    }
                }
                objBo.BarshikFileName = allFiles;
            }
            else
            {
                DataTable BarshikFile = (DataTable)Session["dtBarshikFile"];
                if (BarshikFile != null && BarshikFile.Rows.Count > 0)
                {
                    //update case
                    objBo.BarshikFileName = Session["existingFilename"].ToString();
                }
                else
                {
                    //insert case
                    objBo.BarshikFileName = "";
                }
            }

            wbs = new ProjectService();
            wbs.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationProject();
            int j = objBarsikService.InsertUpdateBarshikFile(objBo);

            Response.Redirect(Constants.ConstantAppPath + "/Modules/BarsikKaryekram/BarsikKaryekram.aspx");

            /*if (FileBarshik.HasFile)
             * {
             *  ProjectBarsikThekaParamarsaBO objBo = new ProjectBarsikThekaParamarsaBO();
             *  objBarsikService = new BarsikKaryekramService();
             *  objBarsikService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBarsikKaryekram();
             *  //lblImage.Text = DateTime.Now + FileBarshik.FileName;
             *  string ext = System.IO.Path.GetExtension(this.FileBarshik.PostedFile.FileName);
             *  var splitseparator = new string[] { ext };
             *  var result = Splitstring(DateTime.Now + FileBarshik.FileName, splitseparator);
             *  String source = result[0];
             *  string str = source  + ext;
             *  str = Regex.Replace(str, @"/", "_");
             *  str = Regex.Replace(str, @":", "_");
             *  objBo.BarshikFileName = str;
             *  objBo.FiscalYearId = Session["fiscal_year_id"].ToInt32();
             *  objBo.ProjectId = Session["projectId"].ToInt32();
             *  UploadFile(FileBarshik, str);
             *  int i=objBarsikService.InsertUpdateBarshikFile(objBo);
             *
             * }*/
        }