Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var currentPriorityKey = chkbxActionItem.Checked ? cboActionPriority.SelectedValue : "NULL";
- var currentAssigned = chkbxActionItem.Checked ? cboActionAssignedTo.SelectedValue : "NULL";
- var addJobNoteSucceeded = db.ExeSQL($"EXEC usp_JobNote @ProjectKey = {ProjectKey}, @EmpGuid = '{EBResources.EmpGuid}', @NoteType = {currentNoteTypeId}, @Title = '{txtTitle.Text}', @Note = '{txtNote.Text}', @ActionItem = {currentActionItem}, @AssignedTo = '{currentAssigned}', @PriorityKey = {currentPriorityKey}, @ChronologicalDate = '{this.dtpDate.Value}', @DesignKey = {cboDesign.SelectedValue}");
- public bool ExeSQL(string sql)
- {
- bool bFlag = false;
- SqlCommand cmd = new SqlCommand(sql.ToString(), this.dbconn)
- {
- CommandTimeout = 0,
- CommandType = CommandType.Text
- };
- try
- {
- cmd.ExecuteNonQuery();
- bFlag = true;
- }
- catch (SqlException e)
- {
- this.HandleSQLError(e, "ExeSQL", sql);
- }
- finally
- {
- cmd.Dispose();
- }
- return bFlag;
- }
- EXEC usp_JobNote @AssignedTo = 'NULL', @PriorityKey = NULL, @ChronologicalDate = '7/23/2019 4:24:46 PM', @DesignKey = 4031
- Error converting data type varchar to uniqueidentifier.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement