|
Hi
As you know a class can have fields,methods,properties and events.In general ,methods are behaviors and fields are attributes of a class.(Properties are some special methods to control accessing to the fields according to the encapsulation rule) therefore if there's a behavior (method or property) it should be implemented (or as the exception says should have a body using brackets) unless it's either an abstract method in an abstract class that it's inheritor should implement it and thus it should not have a body or an external method (a placeholder for a windows API method)
The problem here is that you have a CTSetCaseReviewStatus method that has no body.You can change it like this:
public bool CTSetCaseReviewStatus(string sCaseID, int iStatus)
{
}
|
|
|
|
|
hi friends
How do i add/merge 2 hashtables into third hashtable
Tejesh
|
|
|
|
|
If there's no method for this, you can iterate over the Keys and use those to copy the values in.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
If you use .NET 3.5 then you can use the Union method:
Dictionary<int,> dicA = new Dictionary<int,>();
dicA.Add(1, 10);
dicA.Add(2, 20);
dicA.Add(3, 30);
Dictionary<int,> dicB = new Dictionary<int,>();
dicB.Add(3, 35);
dicB.Add(4, 40);
dicB.Add(5, 50);
var newDic = dicA.Union(dicB);
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
i have developed a custom control that have some property to show/hide its child controls. When i set their Visible prop to False the get Hide. But when i run it or just reopen that control they appear again. Any solution ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi
Can you send us some code ?
|
|
|
|
|
didnt think it would need, well here is it.
public bool ShowThing
{
get { return picturebox1.Visible; }
set { picturebox1.Visible = value; }
}
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi,
Unfortunately I couldn't get you. What do you mean by Run It? Or Reopen It?
When you create a new instance of a Control (User Controls too) its properties got their default values (I hope I could tell it right).
I died as a mineral and became a plant,
I died as plant and rose to animal,
I died as animal and I was Man.
Why should I fear? When was I less by dying?
-- Rumi[^]
My blog
|
|
|
|
|
i know that...'run it' mean run the application
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Ummm... So you set the ShowThing value to false but when you run your application they're visible?
Maybe you changed some values in PropertyBinding or DataBinding. Make sure their values are set to none.
I have a UC like you. It has a property named TextMultiLine, here:
public partial class LabeledTextBox : UserControl
{
public bool TextMultiLine
{
get { return txtText.Multiline; }
set { txtText.Multiline = value; }
}
}
And I have no problem with it:
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
LabeldTextBox ltxt = new LabeledTextBox();
ltxt.TextMultiLine = true;
}
}
I think your problem is in somewhere else. I hope you can find it
I died as a mineral and became a plant,
I died as plant and rose to animal,
I died as animal and I was Man.
Why should I fear? When was I less by dying?
-- Rumi[^]
My blog
|
|
|
|
|
dude, its works after InitializeComponent() called but not before. Dunno whats the cause
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Do you by any chance have a private field that looks like this?
private bool ShowThing = true;
I are troll
|
|
|
|
|
it wont showup in propertygrid
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
[Browsable(true)]
public bool TextMultiLine
{
get { return txtText.Multiline; }
set { txtText.Multiline = value; }
}
This?
I are troll
|
|
|
|
|
well, i got it work...I just needed to make a bool variable that hold the value and i return its value in property and in set i set both(the visible property and that variable). It worked like charm
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
hi ,
i have this problem,
i have a grid contains project combo box and projectStage combo,when i select the project from first combo it will filter the second combo values,
i got it but when i m selecting the project for the next row it filter all second combo values even in the first row, here is my code
private void FrmMain_Load(object sender, EventArgs e)
{
EMS.Timesheet timesheet = new WindowsApplication1.EMS.Timesheet();
dsInitialData = timesheet.GetInitialData(UserProfile.EmployeeId);
bscProject.DataSource = dsInitialData.Tables["Projects"];
dgvTimeAttProject.DataSource = bscProject;
dgvTimeAttProject.DisplayMember = "ProjectRef";
dgvTimeAttProject.ValueMember = "ProjectId";
bscStage.DataSource = dsInitialData.Tables["Stages"]; ;
//bscStage.Filter = "ProjectTypeId=-1";
dgvTimeAttStage.DataSource = bscStage;
dgvTimeAttStage.DisplayMember = "StageName";
dgvTimeAttStage.ValueMember = "ProjectStageId";
}
private void dgvTimeAtt_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
try
{
if (e.RowIndex == -1)
return;
if (dgvTimeAttProject.Index == e.ColumnIndex)
{
int ProjectId = (int)dgvTimeAtt.Rows[e.RowIndex].Cells[dgvTimeAttProject.Index].Value;
int projectTypeId = GetProjectType(ProjectId);
bscStage.Filter = "ProjectTypeId=" + projectTypeId.ToString();
bscActivity.Filter = "ProjectTypeId= " + projectTypeId.ToString();
//dgvTimeAttStage.DataSource = dsInitialData.Tables["Stages"].Select("ProjectTypeId=" + projectTypeId.ToString());
//dgvTimeAttActivity.DataSource = dsInitialData.Tables["Activities"].Select("ProjectTypeId= " + projectTypeId.ToString());
}
}
catch (Exception ex) { throw ex; }
}
so how can i overcome this problem?
|
|
|
|
|
i will ask it in other words,
if i have grid with tow DataGridViewComboBoxColumn first one for contries and second one for cities , when the user select a country the city combo will have the all cities in the country selected in first grid ,
i did it like that:
bscCountries.datasource=GetAllCountries();
dgvCol_Countries.DataSource =bscCountries;
dgvCol_Countries.DisplayMember ="Name";
dgvCol_Countries.ValueMember = "ID";
bscCities.datasource=GetAllCities);
dgvCol_Cities.DataSource =bscCities;
dgvCol_Cities.DisplayMember ="Name";
dgvCol_Cities.ValueMember = "ID";
private void dgvTimeAtt_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
bsc_Cities.filter="CountryId="+dgvCol_Countries.Rows[e.RowIndex].Cell[e.CellIndex].value;
}
that's work fine but , when i go to next row in the grid and select other country the selected city i choose is gone .
How can i fix it?
|
|
|
|
|
Hi friends,
I need to split the line which I am reading from a csv file using ,(comma). But I need to skip the commas which are coming inside quote.For example for line
1,12/12/2008,"This is test, test2"
The result should be
1<br />
12/12/2008<br />
"This is test, test2"
not like
1<br />
12/12/2008<br />
"This is test, <br />
test2"
Please guide me to do this with regular expression or by any other method.
Thanks in advance
Ramesh Ramalingam
|
|
|
|
|
Personally I'd iterate over each character in the string, adding it to a stringbuilder and outputting the result on a comma or end of line. Use a boolean toggle on double quotes to disable in quote commas.
Regards,
Rob Philpott.
|
|
|
|
|
|
I wrote a class for expressly that purpose.
http://www.codeproject.com/KB/recipes/qstringparser_net.aspx[^]
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
You've not given enough information about the format of your string, so this regex will match the given string, but might not work on other strings:
(\d+),(\d+/\d+/\d+),(.+)
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I wrote a class that supports quoted strings.
http://www.codeproject.com/KB/recipes/qstringparser_net.aspx[^]
It should do exactly what you want. To see it work, run the demo app.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I didn't read it closely; does it support escaped quotes within quoted strings?
|
|
|
|
|
No, but you could always extract the quoted string as a field, and then create another parser instance and let fly.
string data = "my mother,the car,"other stuff,'my,other,stuff'",lastfield;
StringParser parser = new StringParser(data, ",", "\"");
string quotedField = parser.GetField(2);
StringParser parser2 = new StringParser(quotedField, ",", "\'");
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
modified on Wednesday, December 31, 2008 3:06 PM
|
|
|
|