public DataTable PopulateBarshikAnya(ProjectBarshikAnyaBO objProjectBarshikAnyaBo) { DbCommand cmd = null; cmd = db.GetStoredProcCommand("PKG_PROJECT_BARSIK_KARYEKRAM.PR_POPULATE_BARSHIK_ANYA", objProjectBarshikAnyaBo.ProjectId, objProjectBarshikAnyaBo.FiscalYearId, OracleDbType.RefCursor); DataSet ds = null; DataTable dt = null; ds = db.ExecuteDataSet(cmd); if (ds != null && ds.Tables.Count > 0) { dt = ds.Tables[0]; } return(dt); }
//barshik anya public int InsertUpdateBarshikAnya(ProjectBarshikAnyaBO objProjectBarshikAnyaBo) { DbCommand cmd = null; cmd = db.GetStoredProcCommand("PKG_PROJECT_BARSIK_KARYEKRAM.PR_PROJECT_BARSHIK_ANYA"); db.AddInParameter(cmd, "V_MODE", DbType.String, objProjectBarshikAnyaBo.Mode); db.AddInParameter(cmd, "V_BARSHIK_ANYA_ID", DbType.Int32, objProjectBarshikAnyaBo.BarshikAnyaID); db.AddInParameter(cmd, "V_PROJECT_ID", DbType.Int32, objProjectBarshikAnyaBo.ProjectId); db.AddInParameter(cmd, "V_FISCAL_YEAR_ID", DbType.Decimal, objProjectBarshikAnyaBo.FiscalYearId); db.AddInParameter(cmd, "V_FIRST_RAKAM_ANYA", DbType.Decimal, objProjectBarshikAnyaBo.FirstRakamAnya); db.AddInParameter(cmd, "V_SECOND_RAKAM_ANYA", DbType.Decimal, objProjectBarshikAnyaBo.SecondRakamAnya); db.AddInParameter(cmd, "V_THIRD_RAKAM_ANYA", DbType.Decimal, objProjectBarshikAnyaBo.ThirdRakamAnya); db.AddInParameter(cmd, "V_REMARKS_ANYA", DbType.String, objProjectBarshikAnyaBo.RemarksAnya); db.AddInParameter(cmd, "V_FIRST_ANYA_PRAGATI", DbType.Decimal, objProjectBarshikAnyaBo.FirstAnyaPragati); db.AddInParameter(cmd, "V_SECOND_ANYA_PRAGATI", DbType.Decimal, objProjectBarshikAnyaBo.SecondAnyaPragati); db.AddInParameter(cmd, "V_THIRD_ANYA_PRAGATI", DbType.Decimal, objProjectBarshikAnyaBo.ThirdAnyaPragati); return(db.ExecuteNonQuery(cmd)); }
protected void PopulateBarshikAnya() { ProjectBarshikAnyaBO objProjectBarshikAnya = new ProjectBarshikAnyaBO(); objProjectBarshikAnya.ProjectId = Session["projectId"].ToInt32(); objProjectBarshikAnya.FiscalYearId = SessionHelper.SessionFiscalYear.ToInt32(); DataTable dt = null; objBarsikService = new BarsikKaryekramService(); objBarsikService.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationBarsikKaryekram(); dt = objBarsikService.PopulateBarshikAnya(objProjectBarshikAnya); if (dt != null && dt.Rows.Count > 0) { txtAnyaFirst.Text = dt.Rows[0]["FIRST_RAKAM_ANYA"].ToString(); txtAnyaSecond.Text = dt.Rows[0]["SECOND_RAKAM_ANYA"].ToString(); txtAnyaThird.Text = dt.Rows[0]["THIRD_RAKAM_ANYA"].ToString(); txtAnyaRemarks.Text = dt.Rows[0]["REMARKS_ANYA"].ToString(); hidBarshikAnyaId.Value = dt.Rows[0]["BARSHIK_ANYA_ID"].ToString(); } }
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); * * }*/ }
public DataTable PopulateBarshikAnya(ProjectBarshikAnyaBO objProjectBarshikAnyaBo) { Authentication(); return(objBarsikDal.PopulateBarshikAnya(objProjectBarshikAnyaBo)); }
public int InsertUpdateBarshikAnya(ProjectBarshikAnyaBO objProjectBarshikAnyaBo) { Authentication(); return(objBarsikDal.InsertUpdateBarshikAnya(objProjectBarshikAnyaBo)); }