|
I just use the C-preprocesor.
|
|
|
|
|
|
Hi I am new to asp.net and c# programming. Can someone give me a clear or line by line explanation of the following code that I can understand and explain somebody about it.
Thanks in advance and the code is
using System;
using System.Collections;
using Claims.SSC.MasterPages;
using CommonService;
using System.Collections.Generic;
namespace Claims.SSC
{
/// <summary>
/// Summary description for Confirmation.
/// </summary>
public partial class Confirmation : System.Web.UI.Page
{
protected string m_sPolicyNumber = string.Empty;
protected string m_sClaimNumber = string.Empty;
//to get the session
CommonService.CommonService SSCS = new CommonService.CommonService();
private UserInfo _UserInfo;
protected void Page_Load(object sender, System.EventArgs e)
{
_UserInfo = SSCS.GetUserInfo(Session.SessionID, false, false, false, false, false);
Master.SetHeader("Claims Service Center", _UserInfo.FullName.ToUpper(), string.Empty,
_UserInfo.PolicyNumber.Length > 0 ? _UserInfo.PolicyNumber : string.Empty);
if (_UserInfo.Origin.ToLower() == AuthenticationService.AuthenticationOrigin.nph.ToString())
{
Master.SetApplicationNavigation(SSCMaster.AuthenticationMethod.NonHolder);
}
else
{
Master.SetApplicationNavigation(SSCMaster.AuthenticationMethod.Holder);
}
Master.TabsToShow = new List<SSCMaster.TabsShown>();
Master.TabsToShow.Add(SSCMaster.TabsShown.MainTab);
Master.ActiveTab = SSCMaster.TabsShown.MainTab; Master.MainTabText = "Confirmation";
// display message
string Msg = SSCS.GetSessionString(Session.SessionID, "ConfirmationMsg");
Message.InnerHtml = Msg;
if (Request.QueryString["Number"] != null && Request.QueryString["Number"] == "false")
{
fldsetClaimSummary.Visible = false;
Master.BottomContent.Visible = true;
Master.BottomContent.InnerHtml = "<br/><br/><br/><br/><br/> ";
}
}
}
}
|
|
|
|
|
I think your question is beyond the scope of this forum. Also, I suspect that Claims.SSC.MasterPages is not a namespace in Microsoft's .NET distribution so any explanation of its functionality would be pure speculation.
|
|
|
|
|
Hi,
I am new to the Dot net C# applications.In my application I have created a toolbar with fixed size and based on the events i need to change the visibility to true or false.On button click when i change the visibility of few of the toolbar buttons the size of the total toolbar buttons is getting changed.
Can someone tell me the right approach to avoid this kind of shrinking in the size of the toolbar buttons.
I used the following code for changing the visibility of the buttons in the toolbar:
toolBar1->Buttons->Item[3]->Visible= false;
Thanks in advance...
|
|
|
|
|
Hey!
I have some features build in but when i command two lines in nothing work!
What is wrong at this two lines?
Code from Server:
//string[] get_Split = get.Split('~');
//int zeit = Convert.ToInt32(get_Split[1]);
if (get.Contains("rHerunterfahren"))
{
System.Diagnostics.Process.Start("shutdown", "-s -t " + zeit.ToString());
}
|
|
|
|
|
What are you trying to do with your code?
Life is a stage and we are all actors!
|
|
|
|
|
When you comment the two lines, zeit and get_Split aren't set to anything or even declared, so the code shouldn't build!
|
|
|
|
|
he should read out the time when he should shutdown the PC!
When i don´t comment the two lines out i can´t open word or so. the client send no word to the Server when it is on!
|
|
|
|
|
the client sent the server "shutdown" + textbox.text
server:
if (get=="shutdown")
System.Diagnostics.Process.Start("shutdown", "-s -t " + zeit.ToString());
and the number in the textbox should he write behind -t.
is there an other change to make it?
|
|
|
|
|
Hi all,
Which control can you recommend using? I am trying to provide a textbox (or something similar) for user input. The user should be able to enter a long paragraph, with the control automatically indenting bullets and sub-bullets? The data is then sent to a database and should be stored with the formatting.
Any ideas?
Thanks
Marc
|
|
|
|
|
This should be simple.Use RichTextBox.SaveFile(Stream,RichTextBoxStreamType) combined with MemorySteam and next save contents of the stream into DB binary field and RichTextBox.LoadFile(Stream,RichTextBoxStreamType) to load the data from the DB binary field.This will save text formatting not the text only.
Life is a stage and we are all actors!
|
|
|
|
|
Hi,
I have a DataGridView in my application which is bound to a BindingList... The control works perfectly when I use it in XP... But when I deploy the same application in Vista, some of the columns of the DataGridView interchange with each other and not in the order that I would want it to display... Can anyone tell me what could be done to have the DataGridView show columns in just the order it was while I designed? I've tried to explicitly specify the column's display index for each of the columns, but no luck..
Please note that this problem occurs only in Vista... It works fine in XP...
Thanks,
ramzg
|
|
|
|
|
Did you try to set compability to XP?
Are you using SQL commands?
Are the columns created programaticly or in design?
|
|
|
|
|
Hi Saksida...
Thanks for the reply..
Here are my replies to your queries...
Did you try to set compability to XP?
My application is compatible with XP... The problem occurs only when i run it on Vista.. And I dint set the compatibility explicitly...
Are you using SQL commands?
No, I'm not using any SQL commands.
Are the columns created programaticly or in design?
The columns were created at design time and values are added to them at runtime..
Thanks,
ramzg
|
|
|
|
|
I am currently reading on MSDN, try AutoGenerateColumns set to false
EDIT: Oh yeah that was your post on MSDN
|
|
|
|
|
Yup,
It was indeed my post... I'm yet to try it on vista... Will get back to you after I try it out...
|
|
|
|
|
I have compiled a C# dictionary that reads data from a text file. How can we embed or encrypt or hide wordlist text data file from end user. Can someone help with a small example. Thanks
|
|
|
|
|
Compile it as a resource within an assembly?
|
|
|
|
|
|
Yes. A good memory. Also need a working example as demo with my thanks in advance to sender.
modified on Wednesday, August 19, 2009 11:23 AM
|
|
|
|
|
I don't think people will send you a demo or code, but you can try Googling encrypting and C. You will be surprised at how easy it will be to get code from Google that nearly suits your entire model, with a need for only slight modification.
|
|
|
|
|
Thanks Eliott for advice on encryption . If feasible, prefer embedding txt file where application path is a difficulty. Its a freeware for my native community but I like to protect my translation work from duplication. I can send said work for a solution...
|
|
|
|
|
Hello.
I'm having a little problem with the Random() class generating the same number. Only the first index is being validated and the rest has the same number.
so far this is my code:
using System;
using System.Collections.Generic;
using System.Text;
namespace LotteryGenerator
{
class RandomNumberGenerator
{
Random randomGenerator;
int[] randomStorage = new int[6];
public RandomNumberGenerator()
{
}
public int RandomGenerator(int randomNumber)
{
for (int a = 0; a < randomStorage.Length; a++)
{
for (int aa = 0; aa < 6; aa++)
{
randomGenerator = new Random();
randomNumber = randomGenerator.Next(1, 20);
randomStorage[aa] = randomNumber;
if (randomStorage[a] == randomNumber)
{
randomNumber = randomGenerator.Next(1, 20);
randomStorage[a] = randomNumber;
}
else
{
}
}
Console.WriteLine("{0}", randomStorage[0]);
}
return randomNumber;
}
}
}
|
|
|
|
|
Try calling new Random() just once, in your constructor. It could be that every time you create a new one it resets the seed.
I hope you realise that hamsters are very creative when it comes to revenge. - Elaine
|
|
|
|