|
Hi folks,
I got a general question that I cannot find the answer for. Consider a 3-tier application architecture with a Web Service handling the business layer (BL) logic. The BL provides the client the facility to create/update/delete or query any given Employee account within the system. Each employee has got a username/password pair that's supposed to be stored in the *aspnetdb* database using the Membership API. The question is that how a client is supposed to create an employee account with one web method, and create a new user name with another web method, *transactionally* under a *stateless* web service???
[WebMethod] void CreateEmployee(Employee employee) { }<br />
<br />
[WebMethod] void CreateUser(string username, string password) {}<br />
How am I supposed to keep the integrity of the system? Maybe, you suggest the following WebMethod instead of those two:
void CreateEmployee(Employee employee, string username, string password) {}
However, this introduces a new bunch of problems under the UpdateEmployee/DeleteEmployee and the like methods.
What should be done to handle the issue rationally?
Thank you for your time,
Mehdi
|
|
|
|
|
|
Ooops! You simply didn't get my point. I didn't ask you how to develop a "secure web service"! I was just talking about ASP.NET Membership/Role providers and how to get the job done under a given transaction. It has got nothing to do with SOAP headers, nor the IIS A&A mechanisms.
Anyway, thanks.
|
|
|
|
|
|
Hi,
I'm having an ussue with populating the datagrid values for editing.I've three levels of data in the grid interlinked with Parent Child relationships.
I Level and II Level - Linked through ProductCode
II Level and III Level - Linked through RefID.
I could be able to populate the I level of record from datagrid.But I level can have any number of II level child records.I couldn't be able to populate the II level.I need to populate the III Level in another datagrid for editing.Can anyone let me know how I should proceed?
Any sample or article that could help me sorting out the issue?
Thank you,
Sincerely,
Deepa
Be the Change You Want to See!
|
|
|
|
|
Element Nodes in XML file have attributes associated with them.
I randomly select element nodes in an XML document after loading it using DOM class. The selected element node can have zero or more Attributes associated with it.
If selected xml node got attribute I displayed it in ListView.
Attribute Name: Being First ColumnHeader
Attribute Value: Being Second ColumnHeader
Name Item being label of listView can be edited if i enable "labeledit" in property of listView.
But Value under the subitem cannot be edited.
1. How can i simply edit both field using listView?
2. Is there any other control or method that will help me create 2 columns according to number of attributes and enable me to edit fields?
3. How can I edit listBox items? Is there any possibility of using it.
Your reply will be highly appreciated.
Thank you.
|
|
|
|
|
h@s@n wrote: How can i simply edit both field using listView?
You can't
h@s@n wrote: Is there any other control or method that will help me create 2 columns according to number of attributes and enable me to edit fields?
DataGrid, or GridView.
h@s@n wrote: How can I edit listBox items? Is there any possibility of using it.
I don't think you can
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
While trying to retrieve the Index number and Checked properties of ToolStripMenuItem and/or ToolStripDropdownItem I could not get them, especially the Index property. How do I get those properties?
Siamginsuan Ngaihte
|
|
|
|
|
Hey,
I have the same problem. Had You found the solution after all these years?
thank for the responces
|
|
|
|
|
public void Show_Categories()
{
MainPage obj = new MainPage();
SQLiteCommand myCMD1 = new SQLiteCommand (ShowCatName_Query , myConnection);
myConnection.Open();
SQLiteDataReader myDR = myCMD1.ExecuteReader();
ToolStripMenuItem Items = new ToolStripMenuItem();
while (myDR.Read())
{
Items = new ToolStripMenuItem();
Items.Name = myDR["Name"].ToString();
Items.Tag = myDR["Name"].ToString();
Items.Text = myDR["Name"].ToString();
Items.Click += new EventHandler(obj.Categories_DropDownItem_Clicked);
this._myCats.DropDownItems.Add(Items);
}
myConnection.Close();
}
//---------------------------------------------------------
public void Categories_DropDownItem_Clicked(object sender, EventArgs e)
{
ToolStripMenuItem ClickedItem = (ToolStripMenuItem)sender;
MessageBox.Show(ClickedItem.Text);
}
|
|
|
|
|
hi forum
any body can tell me how to chat between two or more systems using sockets(windows).in my case firewall can not be off.
thanking you in advance;P
|
|
|
|
|
Too vague - Be more specific about what you want.
|
|
|
|
|
Dear Jacob Klint
May you please tell me how to sign the volume meter you have created and implemented in my project? I got the demo project but that doesn't show how it is implemented and the source code for the demo is not available. After all the progressbar is not signed therefore gives a lot of problem using it. Please help me.
Siamginsuan Ngaihte
|
|
|
|
|
If this is a question related to a CP article, post it in the articles message board (situated at the bottom).
"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
|
|
|
|
|
please tell me how can i export datagrid into excel in winform in C#
please remmember WinForm cause all what i found about WebForm and thanks a lot for your effort......
|
|
|
|
|
In earlier, you'd have had to disassemble Excel to parse its format, but that's long gone in databse world -with very few exceptions-.
You've got two ways:
1- The easy -most effecient- way is to export your data to an intermediary format that could be understood by most Database engines -including Excel-. For example Xml or Html files, or comma/tab delimited text files.
2- The hard way -and I wouldn't know why would anybody go there anymore. There could be some good reasons that I don'y know of though-, is to use Excel Interop -which presumes that MS Excel is already installed on the user's machine. You'd find more derails about this way in Office Interop library documentaion.
Regards
|
|
|
|
|
There is a third party library available somewhere called RKLib.ExportData that can export straight to .xls, but the previouse reply was right, doing csv or xml is easier and more flexible.
|
|
|
|
|
Hi Sir and Madam.
How to know MS Office System Color
Thank You.
|
|
|
|
|
???
|
|
|
|
|
|
Hello Friends
Can someone help me.
I know how to read value using SqlHelper.ExecuteReader using storedProcedure.
But if stored Procedure has a output parameter, I'm not able to read output parameter value.
How to read output parameter value.
I could read output parameter value using SqlHelper.ExecuteNonQuery, but then I'm not able
to read database query column values.
how to read database query column values.
pls help soon
Regards
Balasaheb
Balasaheb
Software Developer
Platform: Asp.net,vb.net
Database: SQL Server 2000
|
|
|
|
|
Create a paramter object, set the direction to output and add it to the command object (but keep the reference to the parameter object). After you have closed the data reader, you can access the output value in the parameter object.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for ur reply
In case of ExecuteReader:-
My stored procedure contains two result set
The actual format of stored procedure is
***************************Stored Procedure start*************************************
declare @colid1 int
declare @col2 uniqueidentifire
declare @Status out
set @col1 = "001"
set @col2 = "{123456789}"
declare @id int
select @id = (select id from tableid where colid = @colid1)
Select col1,col2,col3,col4 from tabel where col1 = @colid1 and col2= @col2
if (exists(select col1,col2 from table2 where col1 = @col1 and col2 = @colid))
{
@Status = 1
}
else
{
@Status =0
}
select @Status as status
*****************************Stored Procedure End****************************************
The above stored procedure is given for reference.
Now my problem is
I'm able to retreive column values using ExecuteReader by passing stored procedure properly
ReaderObj = SqlHelper.ExecuteReader(Pass parameters)
ReaderObj retreives only table1 columns values.......now how to read @Status value(look at above stored procedure)
*****************************************************
arParams[0] = new SqlParameter("@prref",SqlDbType.VarChar,20);
arParams[0].Value = strPrjRef;
arParams[1] = new SqlParameter("@userid",SqlDbType.UniqueIdentifier);
arParams[1].Value = new Guid("{7126886d-2538-429c-ab3c-22b3341dcecf}");
arParams[2] = new SqlParameter("@STATUS", SqlDbType.Int);
arParams[2].Direction = ParameterDirection.Output;
RdPrjDetails = SqlHelper.ExecuteReaderconnstr,CommandType.StoredProcedure, "GET_PROJECT_DETAILS_SP", arParams);
*******************************************************
Pls help me in this regard
Balasaheb
Software Developer
Platform: Asp.net,vb.net
Database: SQL Server 2000
|
|
|
|
|
Ok, so you are not using an output parameter at all?
It's a bit hard to tell, as the stored procedure that you show is lacking the entire declaration part. It's hard to say what parameters you should use in the calling code if you don't show what parameters the stored procedure uses.
Also the stored procedure contains some errors that tells me that this is not the code that you are actually using. If you only show me some made up code, I can only give advice on that code, not on the code that you are actually using.
It's like if you went to your car mechanic and said: "I've brough my bike. Can you take a look at it and tell me what's wrong with my car?"
If you have a query that returns more than one result, use the NextResult method of the data reader to move from the first result to the next.
---
b { font-weight: normal; }
|
|
|
|
|
ok I'm giving u actual stored procedure, earlier stored procedure was given only for reference
The original stored procedure (working perfectly without error) is
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
ALTER PROCEDURE GET_PROJECT_DETAILS_SP
(
@prref varchar(20),
@userid uniqueidentifier,
@STATUS int output
)
As
begin
declare @prjid int
select @prjid = (select PRID from EET_PROJECTS where PRREF = @prref)
IF ((SELECT PRISPATT FROM EET_PROJECTS WHERE PRID = @prjid) = 0)
BEGIN
Select P.PRID as PRID,
P.PRREF as PRREF,
--P.PRNAME as PRNAME,
EUP.PROJECTNAME as PRNAME,
PRACTIVE = case P.PRACTIVE
when 1 then 1
else 0
end,
P.PRDESC as PRDESC,
EUP.PURCHASERNAME as PRPURCHASERNAME,
EUP.ENDUSERNAME as PRENDUSERNAME,
EUP.DESTINATION,
P.PROWNER as PROWNER,
P.PROWNLOC as PROWNLOC,
P.PRMKTLOC as PRMKTLOC,
'' as PRPATT,
EUP.INDUSTRY as PRINDUSTRY,
P.PRPROPOSAL as PRPROPOSAL,
P.PRSALES as PRSALES,
P.PRQUOTCURRENCY as PRQUOTCURRENCY,
P.CREATED_DATE as PRDATE,
CREATED_BY = (SELECT cast(FIRST_NAME + ' ' + LAST_NAME as varchar(161))
FROM EET_SEC_USERS WHERE USERID = P.CREATED_BY),
P.LAST_UPDATED_DATE as PRUP,
LAST_UPDATED_BY = (SELECT cast(FIRST_NAME + ' ' + LAST_NAME as varchar(161))
FROM EET_SEC_USERS WHERE USERID = P.LAST_UPDATED_BY),
((SELECT LOCCOUNTRY FROM EET_LOCATIONS WHERE LOCID = P.PRMKTLOC) + ' (' + P.PRMKTLOC + ')') as PRMKTLOCWITHCOUNTRY,
EUP.GP3_FLAG,
EUP.PROJECTORIGINATOR_NAME,
EUP.PROJECTLEAD_NAME,
EUP.SYS_FUNNEL_POSITION,
EUP.SYS_KOB,
EUP.SYS_PROBABILITY,
EUP.SIS_CONTENT,
EUP.SERV_FUNNEL_POSITION,
EUP.SERV_KOB,
EUP.SERV_PROBABILITY,
P.PRISPATT,
P.PRNOPATTREASON,
NULL as PRPURCHASERID,
case when P.PRUSECUSTPRICE = 1 then 'Yes'
else 'No'
end as USECUSTPRICE,
P.PRCUSTPRICEID,
(SELECT CUPRCUSTOMER
FROM EET_CUSTOMER_PRICING
WHERE CUPRID = P.PRCUSTPRICEID) as CUSTPRICENAME,
dbo.FUNC_GET_LOCATION_LIST(P.PRCUSTPRICEID) as CUSTPRICELOCN,
isnull(EUP.BOOK_DATE, getutcdate()) as PRBOOKDATE,
EUP.transitional_order as PRTRANSPRJSTATUS
from EET_PROJECTS P join EET_USER_PATT_DATA EUP on P.PRID = EUP.EUPDPROJECT
where PRID = @prjid
END
if (exists(select opuserid, opprjid from EET_MY_PROJECTS_LISTS where opuserid = @userid and opprjid = @prjid))
begin
SET @STATUS = 1
end
else
SET @STATUS = 0
select @STATUS as status
end
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
Now u able to understand what is the actual problem.
Thanks in advance
Balasaheb
Software Developer
Platform: Asp.net,vb.net
Database: SQL Server 2000
|
|
|
|
|