|
Make sure you have put showdialog for you form popup on the combo box item changed event. if so, do you see any flickring on the form or you don't see any control on your form? if flickring is there, enable double buffering.
|
|
|
|
|
Sirr/Madam,
Is it right to say that the internal and internal protected access modifiers are accessible in the private assembly.
Thanks and Regards
Pankaj
|
|
|
|
|
You are correct that internal means that it is accessible in the pribate assembly. The prodtected access modifier means that it is accessible within its class and by derived classes. Here is an example for Protected from Microsoft help:
using System;
class A
{
protected int x = 123;
}
class B : A
{
static void Main()
{
A a = new A();
B b = new B();
// Error CS1540, because x can only be accessed by
// classes derived from A.
// a.x = 10;
// OK, because this class derives from A.
b.x = 10;
}
}
Hope that helps.
Ben
|
|
|
|
|
I have been trying to change color of tab control. But all i could do is change the color of tab - pages present on the tab control. It looks very awkward that tab pages of different color and the panel on which these pages are present is default color. Please if any one knows how to change the color of the tab control...
~Vikram Verma
|
|
|
|
|
|
Thanks martin... But isnt there any way provided in visual studio.. I guess this is a common problem.
|
|
|
|
|
vikram Verma wrote: I guess this is a common problem.
Yes,
vikram Verma wrote: But isnt there any way provided in visual studio
No, not that I know!
If you search here on the forum, you will find a lot of questions about that!
|
|
|
|
|
I have declared object in C#. And I want to use a method(logon) for that object in the next statement. Is there any way in C# to do like that. If I try to use it shows "Object does not contain definition for this method". I have tried in VB.net. It is working fine.
siva
siva
|
|
|
|
|
MyClass obj = new MyClass();
obj.Method(param);
if this doesn't help then show us the code...
life is study!!!
|
|
|
|
|
object objsession = Glue.newInstance("ClassName")
when this method is executed, it creates an object objsession. But there is a method called logon after the session is created.
objsession.logon(username,password)
This doesnot work. But in VB.net it works. Is there any solution?
|
|
|
|
|
C# is case sensative. Make sure logon is Logon when the method had capital letters.
|
|
|
|
|
Hello
I have one sql file which is having several lines of transact sql statement. I need to execute all commands in this file using ado.net ? How can i do that ? I tried putting that in sqlcommand object and tried with executenonquery. But it was not working ?
One more thing how can get the messaged send by sql server when running quefries like 0 rows affected or any other message
|
|
|
|
|
1. some code would be usefull in finding the problem.
2. the sql command object's ExecuteNonQuery returns an int that is the number of rows affected.
|
|
|
|
|
I mean i am going to run this query in command object
CREATE PROCEDURE dbo.sp_getDefaultPendingInvoiceToSend_new
(
@company_code varchar(30)
)
AS
if EXISTS (select * from INFORMATION_SCHEMA.tables where table_name = 'orderstemp')
drop table orderstemp
Declare @qry varchar(1500)
Set @qry='select distinct top 50 o.order_no into orderstemp from order_main o, PO_Main p, PO_Receipt_Main r where o.company_code='+''''+@company_code+''''+' and '
set @qry=@qry+'invoice_status !='+''''+'Complete'+''''+' and p.po_Code=r.PO_Code and p.order_no=o.order_no and 1=1 order by o.order_no desc'
print @qry
Exec(@qry)
DECLARE orderno_cursor CURSOR
FOR
select order_no from orderstemp
OPEN orderno_cursor
DECLARE @OrderQty int
DECLARE @ShippedQty int
DECLARE @OrderNo int
if EXISTS (select * from INFORMATION_SCHEMA.tables where table_name = 'TempOrderNo')
drop table TempOrderNo
CREATE TABLE TempOrderNo(order_no int,order_date varchar(20),Login_id varchar(100),order_net_value varchar(20))
FETCH NEXT FROM orderno_cursor INTO @OrderNo
WHILE (@@FETCH_STATUS <> -1)
BEGIN
print 'fetch status = ' + convert(varchar, @@FETCH_STATUS)
IF (@@FETCH_STATUS <> -2)
BEGIN
select @OrderQty= sum(item_qty) from order_detail where order_no=@OrderNo and company_code=@company_code
select @ShippedQty=sum(prd.Qty_shipped) from PO_Receipt_Detail prd, PO_Receipt_Main prm,PO_Main pm, order_main om
where om.order_no=@OrderNo and pm.order_no=om.order_no and om.company_code=@company_code and
pm.PO_Code=prm.PO_Code and prd.POR_Code=prm.POR_Code and om.invoice_status!='Complete' and pm.company_code=@company_code
print 'shipped qty is' + convert(varchar, @ShippedQty)
print 'order qty is' + convert(varchar, @OrderQty)
IF(@OrderQty=@ShippedQty)
insert into TempOrderNo select order_no,convert(varchar(20),order_date,110) as order_date,Login_id,
convert(varchar(20),net_order_value) as order_net_value
from order_main where order_no=@OrderNo and company_code=@company_code
END
FETCH NEXT FROM orderno_cursor INTO @OrderNo
END
CLOSE orderno_cursor
DEALLOCATE orderno_cursor
select top 10 * from TempOrderNo
drop table TempOrderNo
GO
|
|
|
|
|
do you want to know how to execute stored procedure through code ?
|
|
|
|
|
I need to make one query analyzer like what sql server do. so whatever sql commands typed in one textbox should be executed ?
|
|
|
|
|
I am working on a webcontrol that contains linkbuttons and I have to act on the click event of them. Can anyone help me to do this. I can not get it to work.
Matglas
|
|
|
|
|
Matglas wrote: I can not get it to work.
What exactly does that mean? What do you want to do when a link button is clicked? It would help if you show some code.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
This is my code. When creating the child controls I add a linkbutton that has is linked to method viewLogLButton_Click(). But this method does not not execute. I deleted some original code because it was a lot longer.
[ToolboxData("<{0}:ExceptionViewer runat=server />")]
[DesignTimeVisible(true)]
public class ExceptionViewerControl : WebControl
{
protected override void RenderContents(HtmlTextWriter output)
{
this.EnsureChildControls();
this.RenderChildren(output);
}
protected override void OnInit(EventArgs e)
{
}
protected override void CreateChildControls()
{
this.Controls.Clear();
HtmlTable RenderTbl = LoadLogDirectory();
this.Controls.Add(RenderTbl);
}
private const string mainTblId = "exViewerTbl";
private String fileLoad = null;
private HtmlTable _mainFileTable = new HtmlTable();
private HtmlTable MainFileTable
{
get { return _mainFileTable; }
set { _mainFileTable = value; }
}
private HtmlTable LoadLogDirectory(FileInfo file)
{
this.MainFileTable = new HtmlTable();
LinkButton viewLogLButton = new LinkButton();
viewLogLButton.CommandName = "ViewLogFile";
viewLogLButton.CommandArgument = file.Name;
viewLogLButton.Text = file.Name;
viewLogLButton.Click += new EventHandler(viewLogLButton_Click);
ControlCollection controls = new ControlCollection(this);
controls.Add(viewLogLButton);
if (fileLoad == file.Name) {
}
this.MainFileTable.Rows.Add(GetHeaderRow(controls));
return MainFileTable;
}
void viewLogLButton_Click(object sender, EventArgs e)
{
fileLoad = ((LinkButton)sender).CommandArgument;
}
private HtmlTableRow GetHeaderRow(ControlCollection controls)
{
HtmlTableCell headerCell = new HtmlTableCell();
headerCell.Attributes["class"] = styleClass;
headerCell.Attributes["colspan"] = span.ToString();
foreach (Control ctrl in controls)
{
headerCell.Controls.Add(ctrl);
}
headerRow.Cells.Add(headerCell);
return headerRow;
}
}
Matglas
|
|
|
|
|
I'm quite sure it has something to do with dynamically adding the link button, but I do not know how to circumvent this. Try asking this in the ASP.NET forum.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
remove this code
viewLogLButton.Click += new EventHandler(viewLogLButton_Click) from your LoadLogDirectory method then tranfer to OnInit Web Control EventHandler.
Here is a sample code...
protected override void OnInit(EventArgs e)
{
base.OnInit (e);
viewLogLButton.Click += new EventHandler(viewLogLButton_Click);
}
regards,
Mark
|
|
|
|
|
Thanks I'll try it tomorrow when I am back at work.
Matglas
|
|
|
|
|
how to write code for treeview in visual c#
|
|
|
|
|
What do u want?
To create Nodes, Child Node?
|
|
|
|
|
i have create one application in which I have arrange group and subgroup as parent and child.how i can do it give me some projects related this.
|
|
|
|