public void GetPositionName(string PosCode) { if (cn.State == ConnectionState.Open) { cn.Close(); } cn.Open(); lblConnectionState.Text = "CONNECTED"; cmd.Connection = cn; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "GET_POSITION_NAME"; SqlParameter param1 = new SqlParameter(); param1.ParameterName = "POSITION_CODE"; param1.Direction = ParameterDirection.Input; param1.SqlDbType = SqlDbType.VarChar; param1.Value = PosCode; param1.Value = Session["selected_position_code"]; cmd.Parameters.Add(param1); da.SelectCommand = cmd; da.Fill(ds); DataTable dt = ds.Tables[0]; lblPositionName.Text = dt.Rows[0]["POSITION_NAME"].ToString(); }
POSITION_CODE
Session["selected_position_code"]
DataAdapter
DataTable
dt
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)