Click here to Skip to main content
15,901,666 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to enable the USB COM Port..? Pin
Jochen Arndt3-Sep-17 23:49
professionalJochen Arndt3-Sep-17 23:49 
Questionbinding datagridview with entity framework Pin
Member 132649363-Sep-17 7:17
Member 132649363-Sep-17 7:17 
AnswerRe: binding datagridview with entity framework Pin
Mycroft Holmes3-Sep-17 22:49
professionalMycroft Holmes3-Sep-17 22:49 
QuestionUpdate listbox items when button is clicked Pin
Mario Lukačić3-Sep-17 2:19
Mario Lukačić3-Sep-17 2:19 
AnswerRe: Update listbox items when button is clicked Pin
Richard MacCutchan3-Sep-17 21:14
mveRichard MacCutchan3-Sep-17 21:14 
GeneralRe: Update listbox items when button is clicked Pin
Mario Lukačić4-Sep-17 2:31
Mario Lukačić4-Sep-17 2:31 
GeneralRe: Update listbox items when button is clicked Pin
Jochen Arndt4-Sep-17 3:49
professionalJochen Arndt4-Sep-17 3:49 
GeneralRe: Update listbox items when button is clicked Pin
Mario Lukačić4-Sep-17 4:01
Mario Lukačić4-Sep-17 4:01 
GeneralRe: Update listbox items when button is clicked Pin
Jochen Arndt4-Sep-17 4:39
professionalJochen Arndt4-Sep-17 4:39 
GeneralRe: Update listbox items when button is clicked Pin
Mario Lukačić4-Sep-17 5:50
Mario Lukačić4-Sep-17 5:50 
GeneralGetting file path and setting to a public variable ?!?! Pin
Mario Lukačić1-Sep-17 8:42
Mario Lukačić1-Sep-17 8:42 
GeneralRe: Getting file path and setting to a public variable ?!?! Pin
Richard Deeming1-Sep-17 9:30
mveRichard Deeming1-Sep-17 9:30 
GeneralRe: Getting file path and setting to a public variable ?!?! Pin
Mario Lukačić1-Sep-17 9:33
Mario Lukačić1-Sep-17 9:33 
QuestionAPI to https://images.google.com Pin
JanningJuul31-Aug-17 21:34
JanningJuul31-Aug-17 21:34 
AnswerRe: API to https://images.google.com Pin
Richard MacCutchan31-Aug-17 22:06
mveRichard MacCutchan31-Aug-17 22:06 
QuestionIP Address Control in for WPF? Pin
Member 1319657431-Aug-17 20:58
Member 1319657431-Aug-17 20:58 
AnswerRe: IP Address Control in for WPF? Pin
Richard MacCutchan31-Aug-17 21:10
mveRichard MacCutchan31-Aug-17 21:10 
GeneralRe: IP Address Control in for WPF? Pin
Member 1319657431-Aug-17 21:17
Member 1319657431-Aug-17 21:17 
GeneralRe: IP Address Control in for WPF? Pin
Richard MacCutchan31-Aug-17 21:35
mveRichard MacCutchan31-Aug-17 21:35 
AnswerRe: IP Address Control in for WPF? Pin
Bernhard Hiller31-Aug-17 22:24
Bernhard Hiller31-Aug-17 22:24 
SuggestionRe: IP Address Control in for WPF? Pin
Richard Deeming1-Sep-17 2:43
mveRichard Deeming1-Sep-17 2:43 
AnswerRe: IP Address Control in for WPF? Pin
Dave Kreskowiak1-Sep-17 7:52
mveDave Kreskowiak1-Sep-17 7:52 
QuestionWhy It displays error? Pin
sulomila31-Aug-17 20:48
sulomila31-Aug-17 20:48 
I have created SQL store procedure.
 CREATE PROCEDURE spGetMiti (
@engdate varchar(10)
) with encryption AS
BEGIN
   DECLARE @RC int
   DECLARE @RomanDate DATETIME
   DECLARE @PrnLine nvarchar (4000)

   EXEC @RC = [HRDB].[dbo].[s_GetNepaliDate] @engdate, @RomanDate OUTPUT
   SELECT @PrnLine = isnull(CONVERT(nvarchar, @RomanDate, 111), '')
   SELECT @PrnLine [Tarikh]
 END

it displays in correct result after executing store procedure
EXEC spGetMiti '1978/02/03'

Tarikh > 2035/10/21

IN c#, class MtCommom
private string _engdate = string.Empty;
        public string Engdate
        {
            get { return _engdate; }
            set {
                if (value.Length < 10)
                {
                    throw new Exception("Correct date is required");
                } _engdate = value;
            }
        }

        public DataTable GetMiti()
        {
            SqlParameter[] param = new SqlParameter[]
            {
                new SqlParameter("@engdate", _engdate)
            };
            return DAO.GetTable("spGetMiti", null);
        }


in Button Press
MtCommon mtcom = new MtCommon();
     mtxtDOB.Text = string.Empty;
     mtcom.Engdate = mtxtEngDate.Text;
     DataTable dt = mtcom.GetMiti();
     mtxtDOB.Text = dt.Rows[0]["Tarikh"].ToString();


Error Displays
"Procedure or function 'spGetMiti' expects parameter '@engdate', which was not supplied."
AnswerRe: Why It displays error? Pin
Richard MacCutchan31-Aug-17 21:09
mveRichard MacCutchan31-Aug-17 21:09 
GeneralRe: Why It displays error? Pin
sulomila31-Aug-17 21:36
sulomila31-Aug-17 21:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.