Search Results

Search found 161 results on 7 pages for 'rohit'.

Page 6/7 | < Previous Page | 2 3 4 5 6 7  | Next Page >

  • Dynamic order by without using dynamic sql ?

    - by Rohit
    I have the following stored procedure which can be sorted ascending and descending on TemplateName,CreatedOn and UploadedBy. The following SP when runs doesnot sort records.if i replace 2,3,4 by columnname, i got an error message "Conversion failed when converting the nvarchar value 'Test Template' to data type int.".Please suggest how to achieve sorting. CREATE PROCEDURE [dbo].[usp_SEL_GetRenderingTemplate] ( @facilityID INT, @sortOrder VARCHAR(5), @sortExpression VARCHAR(100), @errorCode INT OUTPUT ) AS BEGIN SET NOCOUNT ON ; BEGIN TRY SET @sortOrder = CASE @sortOrder WHEN 'Ascending' THEN 'ASC' WHEN 'Descending' THEN 'DESC' ELSE 'ASC' END SELECT TemplateID, TemplateName, CreatedOn, ( [user].LastName + ' ' + [user].FirstName ) AS UploadedBy FROM Templates INNER JOIN [user] ON [user].UserID = Templates.CreatedBy WHERE facilityid = @facilityID ORDER BY CASE WHEN @sortExpression = 'TemplateName' AND @sortOrder = 'ASC' THEN 2 WHEN @sortExpression = 'CreatedOn' AND @sortOrder = 'ASC' THEN 3 WHEN @sortExpression = 'UploadedBy' AND @sortOrder = 'ASC' THEN 4 END ASC, CASE WHEN @sortExpression = 'TemplateName' AND @sortOrder = 'DESC' THEN 2 WHEN @sortExpression = 'CreatedOn' AND @sortOrder = 'DESC' THEN 3 WHEN @sortExpression = 'UploadedBy' AND @sortOrder = 'DESC' THEN 4 END DESC SET @errorCode = 0 END TRY BEGIN CATCH SET @errorCode = -1 DECLARE @errorMsg AS VARCHAR(MAX) DECLARE @utcDate AS DATETIME SET @errorMsg = CAST(ERROR_MESSAGE() AS VARCHAR(MAX)) SET @utcDate = CAST(GETUTCDATE() AS DATETIME) EXEC usp_INS_LogException 'usp_SEL_GetFacilityWorkTypeList', @errorMsg, @utcDate END CATCH END

    Read the article

  • Modifying an observable collection bound to a ListBox

    - by Rohit Kandhal
    I've a collection in viewmodel binded to listbox. I want to hide a particular type from the collection. Here is the code: public ObservableCollection [YZModeModelView] YZModeModelView { return this.XModelVIew.YZModelViewCollection; } I want to a particular type of model view's from YZModelViewCollection. eg. ModelView's with property abc set to null. Any suggestions ...

    Read the article

  • where to use update panel

    - by Rohit
    I have a custom treeview which i create programmatically as there is a need of specific layout which is not achievable using asp.net treeview.It is on a master page.When i click on treenodes the content area refreshes after a postback.There is a page category.aspx which is a content page of this master page.I have a user control in that content area named products.aspx.Now i want to use ajax to prevent the postback which happens when i click on treenode.I tried putting user control in updatepanel and treeview as well in updatepanel but to no awail. How to use updatepanel in this scenerio.

    Read the article

  • Running Subprocess from Python

    - by Rohit
    I want to run a cmd exe using a python script. I have the following code: def run_command(command): p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) return p.communicate() then i use: run_command(r"C:\Users\user\Desktop\application\uploader.exe") this returns the option menu where i need to specify additional parameter for the cmd exe to run. So i pass additional parameters for the cmd exe to run. How do i accomplish this. I've looked at subprocess.communicate but i was unable to understand it

    Read the article

  • Java me : Can we retrieve bluetooth address of connected device from an open slave connection ?

    - by Rohit
    Here is a typical sequence of events that occur : Host device opens a service ( Host device accepts and opens all incoming connections) A remote device connects to host device. Now, we have a slave connection open at host device. At host device, I want to know the bluetooth address of remote device. I can always pass it as data from remote to host device, but can I extract it from connection object somehow without any data transfer? Thanks in advance...

    Read the article

  • how to find last version no from a list<> in C#

    - by Rohit
    I have a entity class RenderingTemplates. Inside this i have a property List which holds all versions of rendering template. RenderingTemplateVersion has a property VersionName which stores version name as "Version 1.0". I am creating a new version and want to find last version no.so that i can append it by 1 and make new VersionName as "Version 2.0". To accomplish this i have LatestVersion = template.RenderingTemplateVersionList.OrderByDescending(e => e.VersionName.Split(new char[] { ' ', '.' })[1]).First() LatestVersion is a integer. How to convert this to integer.Please help or suggest some other way.

    Read the article

  • Why can't i access page viewstate in usercontrol?

    - by Rohit
    I stored a object in viewstate on Page. Now when i access the same viewsate object on usercontrol,it shows as null. I even tried creating the same viewstate with same name in usercontrol and page.Both holds different value. I understand that viewstate is a protected property. How does this thing implement in above scenerio or is there any other reason for this behaviour.

    Read the article

  • How to change enum definition without impacting clients using it in C#

    - by Rohit
    I have the following enum defined. I have used underscores as this enum is used in logging and i don't want to incur the overhead of reflection by using custom attribute.We use very heavy logging. Now requirement is to change "LoginFailed_InvalidAttempt1" to "LoginFailed Attempt1". If i change this enum, i will have to change its value across application. I can replace underscore by a space inside logging SP. Is there any way by which i can change this without affecting whole application.Please suggest. public enum ActionType { None, Created, Modified, Activated, Inactivated, Deleted, Login, Logout, ChangePassword, ResetPassword, InvalidPassword, LoginFailed_LockedAccount, LoginFailed_InActiveAccount, LoginFailed_ExpiredAccount, ForgotPassword, LoginFailed_LockedAccount_InvalidAttempts, LoginFailed_InvalidAttempt1, LoginFailed_InvalidAttempt2, LoginFailed_InvalidAttempt3, ForgotPassword_InvalidAttempt1, ForgotPassword_InvalidAttempt2, ForgotPassword_InvalidAttempt3, SessionTimeOut, ForgotPassword_LockedAccount, LockedAccount, ReLogin, ChangePassword_Due_To_Expiration, ChangePassword_AutoExpired }

    Read the article

  • How to create string "Version 1.0" in C#

    - by Rohit
    I have to store versionName of a template. VersionName is autoincremented.If last versionName is "Version 1.0", next should be "version 2.0". First time when a template is created, I have to store "Version 1.0". I am using VersionName = "Version "+((LatestVersion+1).ToString()) LatestVersion holds the last version which is 0 in case added for first time. This seems to be a ugly workaround and doesnot even yield Version 1.0. it yields Version 1. I Tried with Version class as well,it does not work. How to accomplish this.Please suggest

    Read the article

  • summer training

    - by rohit-garg
    hi i wanna make a retail store software for my family retail store .... can anyone help me out with which language to use and just give me some basic ideas I'm an engineering student and have good knowledge of ASP, HTML, CSS, VBSCRIPT and have gone through java , c ,c++. please help me anyone

    Read the article

  • Can anyone provide Java program for btree or b+tree???

    - by rohit
    Hi, I am doing a project in which i require btree or b+tree data structure. but its not an important part of project. it would take my time to write a code for it. I googled it but didn't get anything.... So, can anyone provide java code for btree or b+tree implementation (with insert, delete, search algorithms)?????? it should accept string as input and form btree or b+tree of these string.

    Read the article

  • How to reduce this IF-Else ladder in c#

    - by Rohit
    This is the IF -Else ladder which I have created to focus first visible control on my form.According to the requirement any control can be hidden on the form.So i had to find first visible control and focus it. if (ddlTranscriptionMethod.Visible) { ddlTranscriptionMethod.Focus(); } else if (ddlSpeechRecognition.Visible) { ddlSpeechRecognition.Focus(); } else if (!SliderControl1.SliderDisable) { SliderControl1.Focus(); } else if (ddlESignature.Visible) { ddlESignature.Focus(); } else { if (tblDistributionMethods.Visible) { if (chkViaFax.Visible) { chkViaFax.Focus(); } else if (chkViaInterface.Visible) { chkViaInterface.Focus(); } else if (chkViaPrint.Visible) { chkViaPrint.Focus(); } else { chkViaSelfService.Focus(); } } } Is there any other way of doing this. I thought using LINQ will hog the performance as i have to tranverse the whole page collection. I am deep on page which has masterpages.Please suggest.

    Read the article

< Previous Page | 2 3 4 5 6 7  | Next Page >