Search Results

Search found 6055 results on 243 pages for 'forms'.

Page 112/243 | < Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >

  • Unit testing huge applications - Proven methodologies?

    - by NLV
    Hello members I've been working in windows forms applications and ASP.Net applications for the past 10 months. I've always wondered how to perform proper unit testing on the complete application in a robust manner covering all the scenarios. I've the following questions regarding them - What are the standard mechanisms in performing unit testing and writing test cases? Does the methodologies change based on the application nature such as Windows Forms, Web applications etc? What is the best approach to make sure we cover all the scenarios? Any popular books on this? Popular tools for performing unit testing?

    Read the article

  • Problem with passing parameters to SQL procedure using VBA

    - by Stefan Åstrand
    Hi, I am trying to pass @intDocumentNo and @intCustomerNo to a stored procedure using VBA but only @intCustomerNo is updated in dbo.tblOrderHead. I don't think the problem is with the procedure because if I enter the values manually it runs properly. What am I doing wrong? VBA Code: Private Sub intCustomerNo_Click() Dim cmdCommand As New ADODB.Command With cmdCommand .ActiveConnection = CurrentProject.Connection .CommandType = adCmdStoredProc .CommandText = "uspSelectCustomer" '@intDocumentNo .Parameters("@intDocumentNo").Value = Forms![frmSalesOrder].[IntOrderNo] '@intCustomerNo .Parameters("@intCustomerNo").Value = Me![intCustomerNo] .Execute End With DoCmd.Close Forms![frmSalesOrder].Requery End Sub Procedure: UPDATE dbo.tblOrderHead SET dbo.tblOrderHead.intCustomerNo = @intCustomerNo , dbo.tblOrderHead.intPaymentCode = dbo.tblCustomer.intPaymentCode, dbo.tblOrderHead.txtDeliveryCode = dbo.tblCustomer.txtDeliveryCode, dbo.tblOrderHead.txtRegionCode = dbo.tblCustomer.txtRegionCode, dbo.tblOrderHead.txtCurrencyCode = dbo.tblCustomer.txtCurrencyCode, dbo.tblOrderHead.txtLanguageCode = dbo.tblCustomer.txtLanguageCode FROM dbo.tblOrderHead INNER JOIN dbo.tblCustomer ON dbo.tblOrderHead.intCustomerNo = dbo.tblCustomer.intCustomerNo AND dbo.tblOrderHead.intOrderNo = @intDocumentNo

    Read the article

  • PropertyGrid - is it customizable?

    - by serhio
    I have a project in that we have to represent some graphic objects on a usercontrol in WYSIWYG. Also is required to edit each objects properties(Color, Location, etc). I hesitate between using PropertyGrid ('direct' properties edit) and custom forms on DoubleClick ('indirect' edit). The PropertyGrid is very well but should correspond a some criteria: Only selected properties are Displayed (by e.g. if I have TextRectangle want display only Text and Location); Property names should be customizable and internationalizable (by e.g. TextRectangle Text property should be named "Company Name" or "???????? ???????????"). Now about is it possible I think the answer could be Yes, but is it reasonable to use it if we have not a lot of time. What could be quicker implemented, custom forms or Property panel?

    Read the article

  • Contact Form Domain Blacklists (using java, html or php)

    - by Tim
    I'm using HTML contact forms on a business site to post lead information to Salesforce. We're using auto-responders to deliver key information to people who complete a form asking for additional information. The goal is to reject forms that are submitted by competitors. It doesn't need to be bullet proof; the main idea is to reject and form that has an email address associated with a competitor's domain. Can anyone help? Thanks!

    Read the article

  • Overwrite queryset which builds filter sidebar

    - by cw
    Hi, I'm writing a hockey database/manager. So I have the following models: class Team(models.Model): name = models.CharField(max_length=60) class Game(models.Model): home_team = models.ForeignKey(Team,related_name='home_team') away_team = models.ForeignKey(Team,related_name='away_team') class SeasonStats(models.Model): team = models.ForeignKey(Team) Ok, so my problem is the following. There are a lot of teams, but Stats are just managed for my Club. So if I use "list_display" in the admin backend, I'd like to modify/overwrite the queryset which builds the sidebar for filtering, to just display our home teams as a filter option. Is this somehow possible in Django? I already made a custom form like this class SeasonPlayerStatsAdminForm(forms.ModelForm): team = forms.ModelChoiceField(Team.objects.filter(club__home=True)) So now just the filtering is missing. Any ideas?

    Read the article

  • How can I use MVC ideas without using classes?

    - by jpjp
    As of right now, I am still shaky on classes, so I don't want to use any classes for my site. I'm still practicing with classes. But how can I implement the MVC idea without classes? Would this work for a MVC? index.php (the view) index_controller.php index_model.php Is this right for what a MVC should be? View: show html, css, forms Controller: get $_POST from forms and any data from the user, get info from db Model: do all the functions, insert/delete in db, etc Basically separate the HTML/css for the view, all the data collecting for the controller, and the logic for the model. And just connect them all using require_once.

    Read the article

  • "Dynamic" localized display of custom DateTimePicker format

    - by S.C. Madsen
    I have a Winform application with 2 DateTimePicker's on it, initialized as follows: private void InitializeComponent() { ... this._StartDate.Format = System.Windows.Forms.DateTimePickerFormat.Short; .... this._StartTime.CustomFormat = System.Globalization.DateTimeFormatInfo.CurrentInfo.ShortTimePattern; this._StartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; ... } My question is: When I pick a new region from "Regional and Language Options" in the Control Panel, the _StartDate display is updated to reflect the new regional settings, but the _StartTime is not. Why?

    Read the article

  • Powershell GUI: Adding multiple instances of .tooltipseperate to menu

    - by obious
    So, I'm having a problem whereby for some reason I can only add one instance of a .tooltipseperator to a drop down menu. E.g. I have to create a new .tooltipseperator if I want to add another to a different menu list. I have this: $seperator = new-object System.Windows.Forms.Toolstripseparator $seperator1 = new-object System.Windows.Forms.Toolstripseparator which correlates to this: [Void]$packages_menu_bar.DropDownItems.Add($seperator1) [Void]$packages_menu_bar.DropDownItems.Add($Remove_from_AD) [Void]$process.DropDownItems.Add($Kill_process) [Void]$process.DropDownItems.Add($seperator) My question is this: how can I add the same instance on a .tooltipseperater to different menu items? Some sort of array? Thanks

    Read the article

  • How do I tie a cmbBox that selects all drives (local and network) into a treeNode VB

    - by jpavlov
    How do i tie in a selected item from a cmbBox with a treeView? I am looking to just obtain the value of the one selected drive Thanks. Imports System Imports System.IO Imports System.IO.File Imports System.Windows.Forms Public Class F_Treeview_Demo Private Sub F_Treeview_Demo_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ' Initialize the local directory treeview Dim nodeText As String = "" Dim sb As New C_StringBuilder With My.Computer.FileSystem 'Read in the number of drives For i As Integer = 0 To .Drives.Count - 1 '** Build the drive's node text sb.ClearText() sb.AppendText(.Drives(i).Name) cmbDrives.Items.Add(sb.FullText) Next End With ListRootNodes() End Sub Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click Application.Exit() End Sub Private Sub tvwLocalFolders_AfterSelect(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) _ Handles tvwLocalFolders.AfterSelect ' Display the path for the selected node Dim folder As String = tvwLocalFolders.SelectedNode.Tag lblLocalPath.Text = folder ListView1.Items.Clear() Dim childNode As TreeNode = e.Node.FirstNode Dim parentPath As String = AddChar(e.Node.Tag) End Sub Private Sub AddToList(ByVal nodes As TreeNodeCollection) For Each node As TreeNode In nodes If node.Checked Then ListView1.Items.Add(node.Text) ListView1.Items.Add(Chr(13)) AddToList(node.Nodes) End If Next End Sub Private Sub tvwLocalFolders_BeforeExpand(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewCancelEventArgs) _ Handles tvwLocalFolders.BeforeExpand ' Display the path for the selected node lblLocalPath.Text = e.Node.Tag ' Populate all child nodes below the selected node Dim parentPath As String = AddChar(e.Node.Tag) tvwLocalFolders.BeginUpdate() Dim childNode As TreeNode = e.Node.FirstNode 'this i added Dim smallNode As TreeNode = e.Node.FirstNode Do While childNode IsNot Nothing ListLocalSubFolders(childNode, parentPath & childNode.Text) childNode = childNode.NextNode ''this i added ListLocalFiles(smallNode, parentPath & smallNode.Text) Loop tvwLocalFolders.EndUpdate() tvwLocalFolders.Refresh() ' Select the node being expanded tvwLocalFolders.SelectedNode = e.Node ListView1.Items.Clear() AddToList(tvwLocalFolders.Nodes) ListView1.Items.Add(Environment.NewLine) End Sub Private Sub ListRootNodes() ' Add all local drives to the Local treeview Dim nodeText As String = "" Dim sb As New C_StringBuilder With My.Computer.FileSystem For i As Integer = 0 To .Drives.Count - 1 '** Build the drive's node text sb.ClearText() sb.AppendText(.Drives(i).Name) nodeText = sb.FullText nodeText = Me.cmbDrives.SelectedItem '** Add the drive to the treeview Dim driveNode As TreeNode driveNode = tvwLocalFolders.Nodes.Add(nodeText) 'driveNode.Tag = .Drives(i).Name '** Add the next level of subfolders 'ListLocalSubFolders(driveNode, .Drives(i).Name) ListLocalSubFolders(driveNode, nodeText) 'driveNode = Nothing Next End With End Sub Private Sub ListLocalFiles(ByVal ParentNode As TreeNode, ByVal PParentPath As String) Dim FileNode As String = "" Try For Each FileNode In Directory.GetFiles(PParentPath) Dim smallNode As TreeNode smallNode = ParentNode.Nodes.Add(FilenameFromPath(FileNode)) With smallNode .ImageIndex = 0 .SelectedImageIndex = 1 .Tag = FileNode End With smallNode = Nothing Next Catch ex As Exception End Try End Sub Private Sub ListLocalSubFolders(ByVal ParentNode As TreeNode, _ ByVal ParentPath As String) ' Add all local subfolders below the passed Local treeview node Dim FolderNode As String = "" Try For Each FolderNode In Directory.GetDirectories(ParentPath) Dim childNode As TreeNode childNode = ParentNode.Nodes.Add(FilenameFromPath(FolderNode)) With childNode .ImageIndex = 0 .SelectedImageIndex = 1 .Tag = FolderNode End With childNode = Nothing Next Catch ex As Exception End Try End Sub Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbDrives.SelectedIndexChanged End Sub Private Sub lblLocalPath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblLocalPath.Click End Sub Private Sub grpLocalFileSystem_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles grpLocalFileSystem.Enter End Sub Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click ' lbl1.Text = End Sub Private Sub ListView1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged End Sub End Class

    Read the article

  • Login control doesnt work in Internet Explorer

    - by kamiar3001
    I use asp.net cookie in my application here is my web config : <authentication mode="Forms"> <forms path="/" defaultUrl="Default.aspx" loginUrl="Login.aspx" name=".ASPXAUTH" slidingExpiration="true" timeout="3000" domain="www.mysite.com" cookieless="UseDeviceProfile"/> </authentication> it works fine but I have a problem, after some days when a user has been working with the site application, suddenly my login control didn't work. I found out it will work after deleting temporary files. Edit : Please pay attention to domain when User request www.mysite.com every thing is okay but without "www" login doesn't work. in firefox they are working very good. this is IE problem. How I can solve this ?

    Read the article

  • disable a form in asp.net..

    - by rohit
    hi iam working on asp.net using c# project...iam facing a problem...the problem is,i had a master page in which iam using collapse pannel(ajax control)... in collapse pannel i had folders like:- xyz abc def ghi.... and in xyz folder i had some forms.... nw the problem is that i had a search menu in my main page(comes after login)...after searching a grid view is open and in that there is a column name (suppose) XYZ...so when i click on items in that column then only i want xyz folder to be enable or viewed so that i acess forms in that folder....hw cud i do that..i search alot but didn't get the solution..plz help me go through this...

    Read the article

  • pass parameter from javascript to another jsp

    - by gautam
    I want to pass parameter from a Javascript function to another JSP page. Currently I am doing like this: function viewapplet(strPerfMonPoint) { var dateSelected = document.forms[0].hdnDateSelected.value; document.forms[0].hdnPerfMonPoint.value = strPerfMonPoint; var win; win = window.open("jsp/PopUp.jsp?GraphPerfMon="+strPerfMonPoint+"&strDateSelected="+dateSelected, strPerfMonPoint,"width=800,height=625,top=40,left=60 resizable=No"); } I added hdnPerfMonPoint hidden variable and tried to acces in PopUp.jsp using request.getparameter(hdnPerfMonPoint) but it is giving null. I want my window.open like: window.open("jsp/PopUp.jsp", strPerfMonPoint,"width=800,height=625,top=40,left=60 resizable=No"); Please suggest solution.

    Read the article

  • How to get current directory in C# for any Windows version?

    - by DarthRoman
    I am creating an application that can be executed in any windows version, even in mobile's, and I am trying to get the current directory of the executable. The problem is that if I use the following code, it doesn't compile in Windows Mobile: string currentDirectory = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath); And if I use this code, I receive something like: file:\C:\xxx string currentDirectory = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath); Although, I need to get the root drive, and this code doesn't compile in Windows Mobile: String rootPath = Path.GetPathRoot(Environment.SystemDirectory); Does anyone know how to get the current directory of the application and the root path for any windows version, even mobile's?

    Read the article

  • (Django) Trim whitespaces from charField

    - by zardon
    How do I strip whitespaces (trim) from the end of a charField in Django? Here is my Model, as you can see I've tried putting in clean methods but these never get run. I've also tried doing name.strip(), models.charField().strip() but these do not work either. Is there a way to force the charField to trim automatically for me? Thanks. class Employee(models.Model): """(Workers, Staff, etc)""" name = models.CharField(blank=True, null=True, max_length=100) # This never gets run def clean_variable(self): data = self.cleaned_data['variable'].strip() return data def __unicode__(self): return self.name class Meta: verbose_name_plural = 'Employees' # This never gets run either class EmployeesForm(forms.ModelForm): class Meta: model = Employee def clean_description(self): #if not self.cleaned_data['description'].strip(): # raise forms.ValidationError('Your error message here') self.cleaned_data['name'].strip()

    Read the article

  • ASP.NET MVC Filters: How to set Viewdata for Dropdown based on action paramter

    - by CRice
    Hi, Im loading an entity 'Member' from its id in route data. [ListItemsForMembershipType(true)] public ActionResult Edit(Member someMember) {...} The attribute on the action loads the membership type list items for a dropdown box and sticks it in viewdata. This is fine for add forms, and search forms (it gets all active items) but I need the attribute to execute BASED ON THE VALUE someMember.MembershipTypeId, because its current value must always be present when loading the item (i.e. all active items, plus the one from the loaded record). So the question is, what is the standard pattern for this? How can my attribute accept the value or should I be loading the viewdata for the drop down in a controller supertype or during model binding or something else? It is in an attribute now because the code to set the viewdata would otherwise be duplicated in each usage in each action.

    Read the article

  • Convert this VB code to C#?

    - by Róisín Kerr Lautman
    I was wondering if anyone would be able to help me convert the below code to c#? From what I have read it seems to be similar however I am not sure if my 'case' statements are still able to be used? Public Class Form1 Dim dteStart As Date Dim dteFinish As Date Dim span As TimeSpan Public Sub KeyDown(ByVal Sender As System.Object, ByVal e As _ System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown Select Case e.KeyCode Case Keys.Q Label1.BackColor = Color.Green dteStart = Now() Case Keys.W Label2.BackColor = Color.Green Case Keys.E Label3.BackColor = Color.Green Case Keys.R Label4.BackColor = Color.Green dteFinish = Now() span = dteFinish.Subtract(dteStart) Label5.Text = span.ToString End Select End Sub Public Sub KeyUp(ByVal Sender As System.Object, ByVal e As _ System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp Select Case e.KeyCode Case Keys.Q Label1.BackColor = Color.Red Case Keys.W Label2.BackColor = Color.Red Case Keys.E Label3.BackColor = Color.Red Case Keys.R Label4.BackColor = Color.Red End Select End Sub End Class

    Read the article

  • Ajax get throws a syntax error when ip is given instead of localhost

    - by Aruna
    Hi , i am working on cakephp. I have developed an application where i have used localhost in all ajax post and get.. like var ht = $.ajax({ type: "GET", url: "http://localhost/FormBuilder/index.php/forms/getInvitees/<?php echo $emailid;?>", async: false }).responseText; var myObject = eval('(' + ht + ')'); this thing works only when i put localhost . But when i change that to my Ip like http://111.11.11.11/FormBuilder/index.php/forms/getInvitees/", then i am getting a syntax error () in the line var myObject = eval('(' + ht + ')'); WHy it happens ?? Please give valuable suggestions in solving this.. Thank you

    Read the article

  • Access DB with SQL Server Back End

    - by uyuni99
    I have an old Access application that has a lot of code in forms and reports. The database is getting too large and I am thinking of moving the back end to SQL Server. My requirements are as follows: The DB needs to be multiuser and the users (3-5) will need to log in over the web I would prefer not to re-write the forms and reports in ASP or some other web front end. When I think about my choices, I see them as: Have an Access ADP front end and allows remote log-in to the server where it is stored. Not sure if it is possible for 2 users to simultaneously log in Distribute an ADP front end to the users, but I am not sure if it is possible to connect to a SQL Server back end over the internet, and the network traffic may be an issue. Any other solution? I appreciate all help. u

    Read the article

  • How can I get the fully qualified name of an assembly from it's basic name?

    - by GenericTypeTea
    I'm currently writing a custom forms application that allows a user to design a data capture form. I store the field's ControlType and ControlAssembly in the database and then create them on the forms at runtime. For example: ControlType = `System.Web.UI.WebControls.TextBox`. ControlAssembly= `System.Web`. So I can therefor create a fully qualified name and create the control doing the following: string target = Assembly.CreateQualifiedName("System.Web", field.ControlType); Type type = Type.GetType(target); Control control = Activator.CreateInstance(type) as Control; But, this will cause an error as "System.Web" is not a valid assembly name. The assembly name itself has to be fully qualified, i.e. System.Web.Extensions would be: "System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Is there any way I can get the fully qualified name of the assembly System.Web without having to store the entirity of the version, culture and PKT?

    Read the article

  • ASP.NET MVC Filters: How to set Viewdata for Dropdown based on action parameter

    - by CRice
    Hi, Im loading an entity 'Member' from its id in route data. [ListItemsForMembershipType(true)] public ActionResult Edit(Member someMember) {...} The attribute on the action loads the membership type list items for a dropdown box and sticks it in viewdata. This is fine for add forms, and search forms (it gets all active items) but I need the attribute to execute BASED ON THE VALUE someMember.MembershipTypeId, because its current value must always be present when loading the item (i.e. all active items, plus the one from the loaded record). So the question is, what is the standard pattern for this? How can my attribute accept the value or should I be loading the viewdata for the drop down in a controller supertype or during model binding or something else? It is in an attribute now because the code to set the viewdata would otherwise be duplicated in each usage in each action.

    Read the article

  • Unexpected cross threading issue

    - by haughtonomous
    I'm trying to do something very simple in principal, but I keep getting a cross-threading exception which has me stumped because I'm not setting out to use multiple threads. I have a Windows Forms application. It launches another Windows Forms application (using the System.Diagnostics.Process class) , and catches the Exited event when that application is closed. My application event handler then tries to copy text from the clipboard to a control on the current displayed form. At this point a Cross-threading exception is thrown. I assume that the problem is that the event from the closing application is in another thread (I'm outside my comfort zone here, so bear with me), so the question boils down to "How do I prevent this exception?" I'm somewhat constrained into having to copy from the clipboard, but I could launch the other application a different way if that would solve the problem.

    Read the article

  • Modal windows plugin to rails

    - by VP
    Hi, I'm starting to digg some rails plugins to create modal forms in rails. Almost all documents that you find are too old (2006,2007) or more focused in php. I would like to create a "feedback" tab that when you click on that, it opens a form. For example, you can check the railscast website, http://railscasts.com/. Ryan Bates made it in his website, but didnt make any screencast about it. any idea/tip about a rails plugin to work with jquery and to do those forms?

    Read the article

  • Using a backwards relation (i.e FOO_set) for ModelChoiceField in Django

    - by Bwmat
    I have a model called Movie, which has a ManyToManyField called director to a model called Person, and I'm trying to create a form with ModelChoiceField like so: class MovieSearchForm(forms.Form): producer = forms.ModelChoiceField(label='Produced by', queryset=movies.models.Person.producer_set, required=False) but this seems to be failing to compile (I'm getting a ViewDoesNotExist exception for the view that uses the form, but it goes away if I just replace the queryset with all the person objects), I'm guessing because '.producer_set' is being evaluated too 'early'. How can I get this work? here are the relevant parts of the movie/person classes: class Person(models.Model): name = models.CharField(max_length=100) class Movie(models.Model): ... producer = models.ForeignKey(Person, related_name="producers") director = models.ForeignKey(Person, related_name="directors") What I'm trying to do is get ever Person who is used in the producer field of some Movie.

    Read the article

< Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >