i have some problem with the code which is throwing an error during compilation , some one pls guide me to clear it
my code in c#
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Reflection;
using System.Data.SqlClient;
public partial class View_proposallist : System.Web.UI.Page
{
protected int allprop = 0;
protected int curprop = 0;
protected int process_id = 0;
protected void Page_Load(object sender, EventArgs e)
{
int gen_id = Convert.ToInt32(Request.QueryString["gen_id"]);
int propstatus = Convert.ToInt32(Request.QueryString["propstatus_id"]);
curprop = Convert.ToInt32(Request.QueryString["curprop"]);
allprop = Convert.ToInt32(Request.QueryString["allprop"] == null ? Session["allprop"] : Request.QueryString["allprop"]);
process_id = Convert.ToInt32((Request.QueryString["process_id"] == null) ? Session["process_id"] : Request.QueryString["process_id"]);
Session["allprop"] = allprop;
//hypimg
//~/images/allprop.gif
//imsstd();
if (Session["process_id"] == null)
{
Response.Redirect("../View/home.aspx");
}
if (curprop > 0)
{
allprop = 0;
Session.Remove("allprop");
}
if(allprop > 0)
{
hypimg.ImageUrl = "../images/curprop.gif";
hypimg.NavigateUrl = "../View/proposallist.aspx?curprop=0";
}
try
{
//if (!IsPostBack)
//{
mas_list ms = new mas_list();
insert obj = new insert();
//Labelproposal.Text = "<div class='aud_link'><a href='../View/proposal_certification.aspx?propreadonly=1 ' target='_blank' >" +/*obj.selectColumn("cic where process_id="+Convert.ToInt32(Session["process_id"]),"Companyname","")*/"Click here to View Proposal" + "</a></div> ";
string[] myFields = new string[] { "Companyname", "prop_no", "prp_date" };
string slt = "SELECT ci.*, po.*, po.process_id AS Expr1,po.id AS Expr2, re.* FROM proposal po,cic ci,review_cic re,new_process ne where ci.process_id=po.process_id and ci.process_id=re.process_id and ci.process_id=ne.id and ci.process_id=" + Convert.ToInt32(Session["process_id"]) + " and po.id=(select max(prop.id) from proposal prop where prop.process_id =ci.process_id ) " + " order by po.prp_date DESC";
if (allprop > 0)
{
slt = "SELECT ci.*, po.*, po.process_id AS Expr1,po.id AS Expr2, re.* FROM proposal po,cic ci,review_cic re,new_process ne where ci.process_id=po.process_id and ci.process_id=re.process_id and ci.process_id=ne.id and po.id=(select max(prop.id) from proposal prop where prop.process_id =ci.process_id ) order by po.prp_date DESC";
}
string her1 = "../View/proposallist.aspx?gen_id=";
//string her1 = "../View/proposallist.aspx_id=";
string her2 = "../View/proposallist.aspx?propstatus_id=";
---->>>>>>>>> error points to this line --> ms.mas_list(myFields, slt, her1, her2, 6, "AuditList", "generate.png", "prp_date", 1, Convert.ToInt32(Session["role"]));
/*string str1 = "proposal where id='15'";//'" + reader["id"].ToString() + "'";
int sel_id = obj.select_value(str1, "prop_status");
Response.Write("sel_id :" + sel_id);*/
if (propstatus > 0)
{
string[] col ={ "prop_status" };
string[] colval = { "1" };
//int sel = obj.select_id("proposal", "process_id", propstatus);
obj.updateTable("proposal", col, colval, propstatus);
Response.Redirect("../View/proposallist.aspx");
}
//Generating word document
if (gen_id > 0)
{
string jscriptstr = "<script type=\"text/javascript\" language=\"JScript\">";
jscriptstr += "try {";
//selecting data from data base
string sqlstat = "proposal where id='" + gen_id + "'";
//int process_id = obj.select_value(sqlstat, "process_id");
string wherecon = "where id='" + gen_id + "'";
string proposal_no = obj.selectColumn("proposal", "prop_no", wherecon);
Utility utility = new Utility();
SqlConnection thisConnection2 = new SqlConnection();
thisConnection2.ConnectionString = utility.getConnection();
thisConnection2.Open();
string logstr = "SELECT * FROM cic ci,proposal po,review_cic re,currency cur where ci.process_id=po.process_id and ci.process_id=re.process_id and ci.currency=cur.id and ci.process_id=" + process_id;
SqlCommand command2 = new SqlCommand(logstr, thisConnection2);
command2.ExecuteNonQuery();
SqlDataReader reader2 =
Edit/Delete Message
MOD EDIT: Please use the code tags when posting code
This post has been edited by eclipsed4utoo: 21 June 2011 - 04:31 AM

New Topic/Question
Reply



MultiQuote




|