Accessing indd files in a three-tier setup
I made a prototype InDesign Server application where the client tier, middle tier (containing the .indd files) and InDesign Server tier were all the same (my Mac).
I'm currently setting up an environment where each tier is a separate machine on the local network. There is only 1 InDesign Server tier, but there are multiple client and middle tiers.
The middle tiers (where the .indd files reside) can connect to the InDesign Server tier (via Corba).
My question is whether there is a common way the InDesign Server tier can access the .indd files on the middle tiers?
The most obvious solution seems to be via shared folders, but I was wondering if there is another, more flexible solution.
Thanks in advance.
Chris.
Please check the below thread..
https://social.technet.microsoft.com/Forums/sharepoint/en-US/53465d30-10b2-48c9-9541-5ade738156b4/how-to-setup-ssl-cert-for-apps
Don't forget to mark it as an Answer if it resolves your issue and Vote Me as helpful if it useful.
Mahesh
Similar Messages
-
Which files will be download to local by client when Swing+BC as three tier
i have read adfjclientbcwebstart.pdf . when i read page 25,there is a sentence
In contrast to the local deployment explained earlier, the three-tier deployment
only loads the ADF JClient-specific application files to the user desktop, thus
reducing the overall download size.
i notice there are three files in my application server after i deployed ADF BC as Session EJB. They are ModelEJB.jar,ModelEjbCommon.jar and ModelEjbMT.jar.
i want to know who is ADF JClient-specific application files and will be downloaded to client.
thanks a lot.Think about the process:
Log into SharePoint as test user.
List is empty due to permissions.
Click the Export to Excel button.
??? Who's account is running Excel ???
I'm betting you are still logged into your PC as yourself, not the test user. Excel is running with your permissions when it makes the data connection back to SharePoint, not the test user's permissions.
Also, Export to Excel does not use Excel Services. It uses an HTTP request and as such uses the permissions of the caller (the local PC Excel user, or if hand typed into a browser, the SharePoint logged in user). If hand typed it would look something like
this:
http://sharepoint/sites/Training/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=%7B48580CAC%2D58CF%2D4C20%2D8CDE%2DD93B56699818%7D&View=%7B4242B9E9%2D665C%2D46FD%2DBADC%2D72FB8AB63ADA%7D&CacheControl=1
Of course you would have to replace the GUID with the GUID of your list and view.
There's a lot of interesting things you can do with owssvr.dll:
Quick views of the XML used in SharePoint for lists
An alternate to web service calls for client side coding (InfoPath,AJAX, Silverlight, JQuery, etc)
Sometimes better than a web service call as you can reference a list's view to get a filtered list, something would usually require a CAML query. Cmd=Display&List={listGUID}&View=viewname&XMLDATA=TRUE
For more about owssvr.dll see:
http://msdn.microsoft.com/en-us/library/ms478653.aspx
Mike Smith TechTrainingNotes.blogspot.com
Books:
SharePoint 2007 2010 Customization for the Site Owner,
SharePoint 2010 Security for the Site Owner -
In Creative Cloud files when I update my INDD file all my sharers lose access to the updated
In Creative Cloud files when I update my INDD file and export the pdf file all the share links are lost . All my sharers lose access to the updated file. This does not happen at dropbox where when I update a file the share links still work. This is a real nuisance as I want to up date files and keep the link open. Is there a workaround?
I just had similar experience where I lost links to my files in creative cloud. There was an update to creative cloud today and my creative cloud on PC was replaced with a new one. I went to my User Account and found two Creative Cloud Accounts: "Creative Cloud" and "Creative Cloud (unknown)". The "Creative Cloud (unknown)" is where I found my linked files. Check to see if you now have two creative accounts on your PC. This may be the reason????
I am currently copying and pasting all my files into the current "Creative Cloud" from the "Creative Cloud (unknown)". I am only focusing on 1 InDesign Doc I have due to tomorrow and had to manually reset all the links to it. If I have to manually restore all links to my files saved in Creative Cloud--I will blow a gasket on Monday! All PDF files (interactive ones especially) I have saved have lost their links--I don't even want to look at or deal with right now. -
Sharepoint 2013 Foundation three tier farm with two Webservers in NLB
Heloo,
I have been strugling with a problem the last htree days.
I have instelled and configured a sharepoint 2013 three tier farm with Sharepoint 2013 Foundation and MS SQL 2014 Express. This is a Test Farm and all the servers are Windows 2012 R2.
I have one SQL Server, one Application Server and two Webservers. The tow web servers are configured with Multicasting NLB. The NLB name is "sharepoint.ws.domain.net". The IP of the NLB is also in our DNS Zone.I have made a Web Application with
the name "sharepoint.ws.domain.net" on port 80 (NLB name) and a Site collection with the same name.
Now whene I am working on the Sharepoint Site I get very offen a login Window or I get the message "An error occurred while processing the request on the server. The status code returned from the server was: 0".
The error "An error occurred while processing the request on the server. The status code returned from the server was: 0" comes when I try to create a sub Site (most with no Permissions inheritance)... but not allways. I also get sometimes
the same message when I upload files (MS Office documents and PDF files).
The login Windows comes whene I am navigating throw the Sites... but also not allways.I go to the Site with an IE11 and the Site is also in the Intranet security sites.
Can you help me on this one...
Kind Regards
Ioannis KyriakidisWith no hostname on the Web Application, you have to create Host-named Site Collections. So that complicates things a bit.
As far as NLB setup, you create Web Applications the same way you would otherwise. NLB is simply installed on both Web Servers and placed into the NLB VIP (virtual IP). The DNS A record points at the VIP.
Also set up your Windows NLB using Unicast instead of Multicast. If you have certain types of switches that block unicast ARP from multiple clients, e.g. Cisco, you may have to make an exception for them (e.g. http://www.cisco.com/c/en/us/support/docs/switches/catalyst-6500-series-switches/107995-microsoft-nlb.html).
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
How to install oracle applicatons in a three tier architecture
Hi,
i want to install oracle apps in a three tier architecture?
application tier -- middle tier
database tier -- database tier
Any steps or a meta link document
Regards
SudharshanHi,
http://download.oracle.com/docs/cd/B34956_01/current/acrobat/120oaig.pdf
Pages 2-10 and Pages 2-19 don't specify this ???
They indicate only having to install with rapidwiz 1 time (as root user if appl/ora accounts setup) ??It is mentioned in Page 1-2
Release 12 utilizes the conf_<SID>.txt file in certain situations, for example where the database has not yet been created. The configuration file is also employed in multi-node (distributed) installs, where you only need to enter the install information once, on one machine, and can then copy the configuration file to other machines as required.
If you are installing in an environment where different machines are used to support the database and Applications tiers (as is typically the case), you would run Rapid Install on each machine in turn, starting with the database machine.
Regards,
Hussein -
Reporting services in three tier SharePoint 2013 environment
Hi,
I am trying to integrate SQL Server 2012SP1 Reporting Services in a three tier SharePoint 2013 environment, but it seems it is not succesful.
The setup is as following:
SRV1: SQL Server with content, config,... and the Reporting Service databases.
SRV2: SharePoint 2013 Application server & Central Administration
SRV3: SharePoint Web Front with SharePoint sites
All application pools are started with domain accounts on SRV2 & 3
When opening the Central Administration site, the Reporting Services Service Application and its Proxy is created and configured. On SRV2 the Application exists in the application pool in IIS, but it does not appear in the SRV3. Should it be created manualluy?
In Central Administration, when opening the site settings the Reporting Services section is created, but when opening the Site Settings for the root site the section shows variables:
$Resources:ReportServerResources,ReportServerSiteSettingsGroupTitle;
$Resources:ReportServerResources,ScheduleList;
$Resources:ReportServerResources,SiteLevelSettings;
$Resources:ReportServerResources,ManageSiteDataAlerts;
I believe i need some help here.
Thanks in advance.
Best regards,
JHi J-S,
Generally, the issue occurs if you are in the Windows Powershell instead of the SharePoint Management Shell or the Reporting Services - SharePoint mode feature is not installed. So, please double check you are using the SharePoint Management Shell or install
the Add-in by installing the rssharepoint.msi instead. Here is the download link:
http://www.microsoft.com/en-us/download/details.aspx?id=35583
If it is not the issue, please install the Reporting Services - SharePoint mode from the SQL Server 2012 installation media.
Reference:
http://msdn.microsoft.com/en-us/library/ms144289.aspx#bkmk_cmdlets_not_recognized
Regards,
Mike Yin
If you have any feedback on our support, please click
here
Mike Yin
TechNet Community Support -
Not able to access a file referenced from a HTML file
Hi,
Using UCM i am checking two files aboutus.html and aboutusBanner.png in About Us FOLDER.Checkin is happening perfectly well.
Now In JDEVELOPER I am creating a webcenter application (named MyPortalApplication) and accessing those file using a connection to the UCM server.I am able to fetch the files under
Application Resouces->Connection ->Content Repository ->UCM ->Contribution Folder ->About Us
UCM I am using a connection name.
My aboutus.html file in accessing the aboutusBanner.png to display some image.
Below is code snippet for aboutus.html ...
<table align="CENTER" width="930px" BORDER=0 bgcolor="white">
<tr>
<td>
<img src="aboutusBanner.png" />
</td>
</tr>
<tr>
<td valign="top">
<p style="font-family:Verdana;font-size:14px">
<br>
Go Green Eat Fresh opened in 1992 by three Italian brothers with a vision:
</p>
</td>
</tr>
</table>
But when i am running the application that banner image (aboutusBanner.png) is not getting displayed.I think i am not giving the path aboutusBanner.png in aboutus.html correctly.
Please suggest me how my aboutus.html should use the aboutusBanner.png in code given above.
Thanks,
Rajeev<img src="aboutusBanner.png" />This may reference the file while it is on filesystem (most likely on a web server, must be in the same directory).
If you want to create a reference to a file in UCM (document repository), you need to do it differently. The easiest way (if your file is in Public security group) is to use html link to the file: e.g. http://{serverURL}/{instance name}/groups/public/documents/graphic/oly_088631.jpg (search for the file in UCM and copy the link from the search result dialog).
A better way is to use SSXA - see this manual http://download.oracle.com/docs/cd/E17904_01/doc.1111/e13650/toc.htm - when your html will be constructed from a template and the image will be defined through a placeholder (you will learn to use placeholders in Chapter 3 of the manual). Since PS3, SSXA should be usable for Webcenter pages. -
How to get all TextFrame from ImportedPage INDD Files?
Hi everyone!
Do you know the javascript scripts to get all textFrames in importedPage (.indd file)? Is it posible to do that or have some trick to do it?Use
JDR_UTILS.LISTDOCUMENTS
Use this API to list of all OA Framework the documents in a path/module. This script is very handy, as it provides a list of all the desired documents/extensions/personalizations in one go.
DECLARE
BEGIN
jdr_utils.listdocuments('/oracle/apps/po/setup', TRUE);
END;
Thanks
--Anil
oracleanil.blogspot.com -
Three tier (mod pl/sql) vs. two tier (PL/SQL Gateway)
I've been using 10g Database and 10g application server on separate servers for some time now.
Going the two tier (11g) route has some attractions, but what are the disadvantages?
The Oracle documentation I've seen says very little on making the decision, giving benefits as:
Ease of configuration
Included in the database
No separate server installation
- but no negatives.
Does anyone have any real live experience of comparing the two options?
I'm inclined to believe that three tier might have more tuning flexibility, better performance if each tier is on a different server. Maybe worse than two tier if on one server, assuming two tier eliminates communication overheads..
Does pl/sql gateway have the caching ability of Apache/mod pl/sql - I assume not? - that could make a big difference.
Any thoughts would be welcome...There are several key performance advantages of OHS over EPG. I'm working a lot with the EPG right now and pushing the XDB team to add several of these features (maybe in 11.2, possible backport, but don't count on it). I used recommendations from the yslow Firefox add-in to do some performance tuning. Here's there list of Best Practices:
http://developer.yahoo.com/performance/rules.html
- EPG does not add an "Expires" header. So, lets say you have 25 images in your page template, and none of them change. Each page view will still request those 25 images. They use etags, so you don't have to download the images, but your browser still makes the requests which is quite slow. From my testing, pages could be up to 4 times slower with the EPG with a pretty standard template. The XDB team is aware of this and working hard to resolve it.
- EPG does not support gzip. This is another HUGE performance hit.
Keep in mind you can't test any of those issue with debug mode in APEX, you really need to use a browser plugin such as Firebug + ySlow. The render speed from APEX's point of view will be the same, no matter what HTTP server you use.
The other big on is mod_rewrite support. There is no way easily create friendly URLs for your apps. Another thing to consider is that a number of Identity Management systems, such as Oracle Access Manager (OAM) work by installing an Apache Module or in the case of IIS, some type of plugin (forget what they call it). There is no concept of this in EPG.
IMHO, it's convenient for laptops, but I would never use it for production unless you needed some feature that it exposes, such as WebDav or FTP access to the XDB repository...
Tyler -
Can't open INDD file from icon
I have an installation of InDesign CS3 (upgraded from CS2) that won't let the user open a file from it's icon. You get the error message of "<filename> is not a valid win32 application" The file will open if you open InDesign and use the file open menu. The icon isn't the InDesign icon either-looks like a doc file icon without Word installed. I've gone into File Types (from the Tools-Folder Options-File Type window) and tried to manually made the indd file open with CS3 but that still didn't work (oddly when I try to use the CS3 icon it too has a generic .exe icon).<br /><br />If I log in as myself (admin rights on the Windows XP) and once I did the above it worked for me. I gave the user full rights and tried the above again but it didn't work-still wouldn't open by clicking on the icon-just keep getting that error message. Any help would be great as I can't seem to come across anything googled that is helping.
This is a follow-up. My question has been answered in that did get to open the file as follows:
By trial and error (based on responses) basically I was able to open the file as a copy from inside InDesign. There are three options in the lower left had corner of the window, I picked copy after trying the other two. Up until this time I could not find any idlk file.
Once I opened the file I backed it up and made another copy that I opened. I went back to the original file and tried to open it from finder. It would not open. Still no sign of the idlk file. But when I went back to open the work copy it opened but now the idlk file popped up in the finder and it continues to do so every time I open any file associated. This idlk file comes up with an icon that says "Locked"
My only question now: Is there a way to unlock this file from whatever it is linking to? Does it make any difference at this point?
I have learned this is a temp file of sorts that prevents changes to the original file. I would like to unlock the file so that it not connected to anything.
I have moved or deleted all files that it might be linking to. I have shut down other computers and hard drives using the same network. The idlk file come up every time. It goes away when I close the file. I have also deleted it while the file is open. I deleted all attempts at creating Book files. I'v been through preferences and checked Assignments. It seems like once you make a copy of a file, the original is always looking for the copy? Or the copy for the original?
So I'm working and making separate files for each chapter so that I can set up a book and have back-up and maybe create a whole new Book file that isn't linked to anything else but maybe that's not necessary.
I've been working with InDesign for a long time and never encountered this phenomenon before.
Thanks again for your responses.
Jim -
Auditing failed access to files and folders in Windows Storage Server 2008 R2
Hello,
I've been trying to figure out why I cannot audit the failed access to files and folders on my server. I'm trying to replace a unix-based NAS with a Windows Storage Server 2008 R2 solution so I can use my current audit tools (the 'nix NAS
has basically none). I'm looking for a solution for a small remote office with 5-10 users and am looking at Windows Storage Server 2008 R2 (no props yet, but on a Buffalo appliance). I specifically need to audit the failure of a user to access
folders and files they are not supposed to view, but on this appliance it never shows. I have:
Enabled audit Object access for File system, File share and Detailed file share
Set the security of the top-level share to everyone full control
Used NTFS file permissions to set who can/cannot see particular folders
On those folders (and letting those permissions flow down) I've set the auditing tab to "Fail - Everyone - Full Control - This folder, subfolders and files"
On the audit log I only see "Audit Success" messages for items like "A network share object was checked to see whether client can be granted desired access (Event 5145) - but never a failure audit (because this user was not allowed access by NTFS permissions).
I've done this successfully with Windows Server 2008 R2 x64 w/SP1 and am wondering if anybody has tried this with the Windows Storage Server version (with success of course). My customer wants an inexpensive "appliance" and I thought this new
variant of 2008 was the ticket, but I can't if it won't provide this audit.
Any thoughts? Any of you have luck with this? I am (due to the fact I bought this appliance out of my own pocket) using the WSS "Workgroup" flavor and am wondering if this feature has been stripped from the workgroup edition of WSS.
TIA,
--JeffreyHi Jeffrey,
The steps to setup Audit on a WSS system should be the same as a standard version of Windows Server. So please redo the steps listed below to see if issue still exists:
Enabling file auditing is a 2-step process.
[1] Configure "audit object access" in AD Group Policy or on the server's local GPO. This setting is located under Computer Configuration-->Windows Settings-->Security Settings-->Local Policies-->Audit Policies. Enable success/failure auditing
for "Audit object access."
[2] Configure an audit entry on the specific folder(s) that you wish to audit. Right-click on the folder-->Properties-->Advanced. From the Auditing tab, click Add, then enter the users/groups whom you wish to audit and what actions you wish to audit
- auditing Full Control will create an audit entry every time anyone opens/changes/closes/deletes a file, or you can just audit for Delete operations.
A similar thread:
http://social.technet.microsoft.com/Forums/en-US/winserverfiles/thread/da689e43-d51d-4005-bc48-26d3c387e859
TechNet Subscriber Support in forum |If you have any feedback on our support, please contact [email protected] -
Using AirPort Time Capsule as an external drive with access to files by guest account
Is it possible to use my AirPort Time Capsule as an external drive with access to files by a guest account?
I would like to store a large number of folders containg photographs on my AirPort Time Capsule and allow anyone with a password to access the photographs - at the time of viewing the Time Capsule would be connected to the internet but I wouldn't want users to actually access anything other than the files on the Time Capsule - is this possible? if so any help in configuring it would be really helpful.No it is not possible.. Guest is just that.. a guest that is allowed permission to access the internet but none of the local files.
To give a person access to the TC they must have password to access your normal network..
From there it is up to you how you do this.. people cannot actually access files on your computers unless you give them share and password permissions for that.. you can even setup accounts on the TC although I recommend against it.. if you want shared photos anyway. All security on a TC is illusion.. merely pressing the reset and it is all blown away.. so if you are concerned about security don't put stuff on the TC people should not access.. or like your TM backups ensure they are encrypted.
A person can then access you TC and the photos.. but what else on the network?? -
Slow access to files that are already being opened by another user
HI,
A client has a Windows 2008 server setup with Windows 7 workstations. When a user opens a document (docx, xlsx etc) on the server it opens without an issues. If a second user tries to open the same file that the first user is in, the second users
computer hangs for about 2-3 minutes before bringing up the 'another user in accessing this file' box. This is happening with every file type and with any user.
Any ideas?Hi,
Do you mean that only the office files have the issue or all file types have the issue? Please refer to the thread below to troubleshoot the issue:
File Server Role: Slow access for "opened files" and slow Explorer browsing
http://social.technet.microsoft.com/Forums/windowsserver/en-US/3b73f5c3-9f6b-4270-bef3-14c14137e734/file-server-role-slow-access-for-opened-files-and-slow-explorer-browsing?forum=winserver8gen
Regards,
Mandy
If you have any feedback on our support, please click
here .
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Problems accessing Music Files in Slideshow module in LR 2.6 and Windows 7 64 bit
Just got new computer 64 bit Windows 7. Installed LR 2.6 and am having problem with slideshow and music. Never had this problem before with my XP computer. When I open up slideshow module and go to Playback window and check soundtrack and try to choose a music folder, I have a new problem. It opens up "Browse for Files & Folders" dialog box as usual, but it only lets me browse on my desktop or my User name on the C drive. My music is in my F drive where my data is stored. I've never had a problem accessing my music in my F drive in my XP computer, but this setup limits where I can browse to. Interesetingly, this works OK in LR 3 beta on this WIndows 7 PC where it opens up a dialog box "Choose a music file to play" which gives me access to all my drives. In summary, I can't access music files stored on a drive other than my C drive using LR 2.6 on a Windows 7 64 bit computer.
I have attached a screen shot to compare the new Windows 7 Browse for Files & Folders dialog box to that in my XP computer.
Would appreciate any suggestions.
Thanks,
Matthew KrausThanks for the reply. I went through the process you suggested to change Ownership & grant permission to access files. When I get to the owner tab in Advanced Security Settings....I am already the current owner of this folder.
What do I do now?
Thanks,
Matthew Kraus -
WPF How can I implement the INotifyPropertyChanged in a Three-tier architecture?
I am a student and I am confused on using the INotifyPropertyChanged in a three-tier style of coding. Can you guys help me a bit with these?
I have a solution named MetroAppProject. It is composed of four projects (I omitted the using clauses and references, just imagine they are there and are working fine):
1. MetroApp.BluePrints - a class library composed of the classes in my sql db
An example of my class
namespace MetroApp.BluePrints
public partial class Patient
public long Id { get; set; }
public string PatientNumber { get; set; }
public string LastName { get; set; }
public string FirstName { get; set; }
public string MiddleName { get; set; }
public string AddressLine1 { get; set; }
public Nullable<short> CityId { get; set; }
public string CityName { get; set; }
public Nullable<short> ProvinceId { get; set; }
public string ProvinceName { get; set; }
Then the second project:
2. MetroApp.DataAccess = a class library composed of methods that calls my sql procedures. I used the SqlHelper class which contains the connection strings and other stuffs.
example class
namespace MetroApp.DataAccess
public class PatientDb
public Patient Retrieve(PatientParams parameters)
SqlCommand command = new SqlCommand();
Patient singItem = new Patient();
command.CommandText = "RetrievePatients";
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@Id", parameters.Id).Direction = ParameterDirection.Input;
DataTable dt = SqlHelper.GetData(command);
if (dt.Rows.Count > 0)
DataRow row = dt.Rows[0];
singItem.Id = TDefaultValue.GetInt(row["Id"].ToString());
singItem.PatientNumber = TDefaultValue.GetString(row["PatientNumber"].ToString());
singItem.LastName = TDefaultValue.GetString(row["LastName"].ToString());
singItem.FirstName = TDefaultValue.GetString(row["FirstName"].ToString());
singItem.MiddleName = TDefaultValue.GetString(row["MiddleName"].ToString());
singItem.AddressLine1 = TDefaultValue.GetString(row["AddressLine1"].ToString());
singItem.CityId = TDefaultValue.GetShort(row["CityId"].ToString());
singItem.CityName = TDefaultValue.GetString(row["CityName"].ToString());
singItem.ProvinceId = TDefaultValue.GetShort(row["ProvinceId"].ToString());
singItem.ProvinceName = TDefaultValue.GetString(row["ProvinceName"].ToString());
return singItem;
public List<Patient> RetrieveMany(PatientParams parameters)
var items = new List<Patient>();
var command = new SqlCommand();
command.CommandText = "RetrievePatients";
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@Id", parameters.Id).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@PatientNumber", parameters.PatientNumber).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@LastName", parameters.LastName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@FirstName", parameters.FirstName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@MiddleName", parameters.MiddleName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@CityId", parameters.CityId).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@ProvinceId", parameters.ProvinceId).Direction = ParameterDirection.Input;
DataTable dt = SqlHelper.GetData(command);
foreach (DataRow row in dt.Rows)
var item = new Patient();
item.Id = TDefaultValue.GetLong(row["Id"].ToString());
item.PatientNumber = (row["PatientNumber"].ToString());
item.LastName = (row["LastName"].ToString());
item.FirstName = (row["FirstName"].ToString());
item.MiddleName = (row["MiddleName"].ToString());
item.AddressLine1 = (row["AddressLine1"].ToString());
item.CityId = (short)row["CityId"].ToString();
item.CityName = (row["CityName"].ToString());
item.ProvinceId = (short)row["ProvinceId"].ToString();
item.ProvinceName = (row["ProvinceName"].ToString());
items.Add(item);
return items;
public bool Insert(Patient entity, int userId, ref bool doesExist)
var command = new SqlCommand();
try
command.CommandText = "AddPatient";
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@PatientNumber", entity.PatientNumber).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@LastName", entity.LastName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@FirstName", entity.FirstName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@MiddleName", entity.MiddleName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@AddressLine1", entity.AddressLine1).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@CityId", entity.CityId).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@ProvinceId", entity.ProvinceId).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@Id", entity.Id).Direction = ParameterDirection.Input;
command.Parameters.Add("@DoesExist", SqlDbType.Bit).Direction = ParameterDirection.Output;
int result = SqlHelper.ExecuteNonQuery(command);
doesExist = (bool)(command.Parameters["@DoesExist"].Value);
entity.Id = (int)(command.Parameters["@Id"].Value);
if (result == 0 || doesExist)
return false;
return true;
catch (Exception)
return false;
public bool Update(Patient entity, int userId, ref bool doesExist)
var command = new SqlCommand();
try
command.CommandText = "EditPatient";
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@PatientNumber", entity.PatientNumber).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@LastName", entity.LastName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@FirstName", entity.FirstName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@MiddleName", entity.MiddleName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@AddressLine1", entity.AddressLine1).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@CityId", entity.CityId).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@ProvinceId", entity.ProvinceId).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@Id", SqlDbType.Int).Direction = ParameterDirection.Output;
command.Parameters.Add("@DoesExist", SqlDbType.Bit).Direction = ParameterDirection.Output;
doesExist = (bool)(command.Parameters["@DoesExist"].Value);
int result = SqlHelper.ExecuteNonQuery(command);
if (result == 0 || doesExist)
return false;
return true;
catch (Exception)
return false;
Then a business logic
3. MetroApp.BusinessLogic = class libray for calling the methods from DataAccess
namespace MetroApp.BusinessLogic
public class PatientMgr
#region Fields
private readonly PatientDb _db;
#endregion
#region Properties
public Patient Entity { get; set; }
public List<Patient> EntityList { get; set; }
public PatientParams Parameters { get; set; }
#endregion
#region Constructors
public PatientMgr()
_db = new PatientDb();
Entity = new Patient();
EntityList = new List<Patient>();
Parameters = new PatientParams();
#endregion
#region Methods
public Patient Retrieve(PatientParams parameters)
return _db.Retrieve(parameters);
public List<Patient> RetrieveMany(PatientParams parameters)
return _db.RetrieveMany(parameters);
public bool Insert(Patient entity, int userId, ref bool doesExist)
return _db.Insert(entity, userId, ref doesExist);
public bool Update(Patient entity, int userId, ref bool doesExist)
return _db.Update(entity, userId, ref doesExist);
#endregion
Then the last one, the WPF GUI
<UserControl x:Class="MetroDentProject.Pages.PatientDetailsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dims="clr-namespace:MetroAppProject.UserCons"
mc:Ignorable="d"
d:DesignHeight="720" d:DesignWidth="1280">
<Grid x:Name="MainGrid" >
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<GroupBox Grid.Column="0" Grid.Row="1" Grid.RowSpan="7" x:Name="DetailsGroupBox" Header="Patient Details" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="Id: " Grid.Column="1" Grid.Row="0" Visibility="Collapsed"/>
<TextBox x:Name="IdTextBox" Grid.Column="1" Grid.Row="1" Visibility="Collapsed"/>
<TextBlock x:Name="PatientNumberTextBlock" Text="Patient Number: " Grid.Column="0" Grid.Row="0" />
<TextBox x:Name="PatientNumberTextBox" Grid.Column="1" Grid.Row="0" IsReadOnly="True" IsReadOnlyCaretVisible="True"/>
<TextBlock Text="Last Name: " Grid.Column="0" Grid.Row="1" />
<TextBox x:Name="LastNameTextBox" Grid.Column="1" Grid.Row="1" />
<TextBlock Text="First Name: " Grid.Column="0" Grid.Row="2" />
<TextBox x:Name="FirstNameTextBox" Grid.Column="1" Grid.Row="2" />
<TextBlock Text="Middle Name: " Grid.Column="0" Grid.Row="3" />
<TextBox x:Name="MiddleNameTextBox" Grid.Column="1" Grid.Row="3" />
</Grid>
</GroupBox>
<GroupBox x:Name="ContactDetailsGroupBox" Header="Contact Details" Grid.Column="1" Grid.Row="1" Grid.RowSpan="7">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="Address: " Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" />
<TextBlock Text="City: " Grid.Column="0" Grid.Row="2" />
<TextBlock Text="Province: " Grid.Column="0" Grid.Row="3"/>
<TextBox x:Name="AddressTextBox" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2"
TextWrapping="Wrap"
AcceptsReturn="True"
VerticalScrollBarVisibility="Auto"
/>
<ComboBox x:Name="CitiesComboBox" Grid.Column="1" Grid.Row="2" />
<ComboBox x:Name="ProvincesComboBox" Grid.Column="1" Grid.Row="3" />
</Grid>
</GroupBox>
<dims:FunctionButtonsControl x:Name="FunctionButtonsCon" Grid.Row="9" Grid.Column="0" Grid.ColumnSpan="2"
ExecuteClick="FunctionButtonsCon_OnExecuteClick"
UndoClick="FunctionButtonsCon_OnUndoClick"
BackClick="FunctionButtonsCon_OnBackClick"
DeleteClick="FunctionButtonsCon_OnDeleteClick"
/>
</Grid>
</UserControl>
I apologize for the long post. As you can see, I don't use binding. Binding requires me to use INotifyPropertyChanged interface which I am not familiar. Can you at least make my project to implement the INotifypropertyChanged?
Here is my sample code for the WPF page:
public partial class PatientDetailsPage
readonly PatientMgr itemMgr = new PatientMgr();
public PatientParams CurrentPar = new PatientParams(); // for undoActionType _action = ActionType.Insert; // this is an enum from another project, ActionType.Insert, ActionType.Update
public ActionType Action
get { return _action; }
set { _action = value; }
public PatientDetailsPage()
InitializeComponent();
BindComboBoxes();
#region Methods
public void OnFragmentNavigation(FragmentNavigationEventArgs e)
public void OnNavigatedFrom(NavigationEventArgs e)
public void OnNavigatedTo(NavigationEventArgs e)
{ Setup();
public void OnNavigatingFrom(NavigatingCancelEventArgs e)
public Patient GetPageEntity()
Patient setEntity = new Patient();
setEntity.Id = (long)IdTextBox.Text;
setEntity.PatientNumber = PatientNumberTextBox.Text;
setEntity.LastName = LastNameTextBox.Text;
setEntity.FirstName = FirstNameTextBox.Text;
setEntity.MiddleName = MiddleNameTextBox.Text;
setEntity.AddressLine1 = AddressTextBox.Text;
setEntity.CityId = (short)CitiesComboBox.SelectedValue);
setEntity.ProvinceId = (short)ProvincesComboBox.SelectedValue;
setEntity.StatusId = true;
return setEntity;
public void Setup()
switch (Action)
case ActionType.Insert:
Clearer(); //clears all textboxes and set all comboboxes to default
this.PatientNumberTextBlock.Visibility = Visibility.Collapsed;
this.PatientNumberTextBox.Visibility = Visibility.Collapsed;
FunctionButtonsCon.ExecuteButton.Content = "Add";
FunctionButtonsCon.DeleteButton.IsEnabled = false;
FunctionButtonsCon.DeleteButton.Visibility = Visibility.Hidden;
break;
//**Setup Update
case ActionType.Update:CurrentPar.Id = (long)IdTextBox.Text;
LoadSingle(CurrentPar);
this.PatientNumberTextBlock.Visibility = Visibility.Visible;
this.PatientNumberTextBox.Visibility = Visibility.Visible;
FunctionButtonsCon.ExecuteButton.Content = "Save";
FunctionButtonsCon.DeleteButton.IsEnabled = true;
FunctionButtonsCon.DeleteButton.Visibility = Visibility.Visible;
break;
LastNameTextBox.CaretIndex = LastNameTextBox.Text.Length;
IsVisibleChanged += AutoFocus;
public void LoadSingle(PatientParams parameters)
var entity = itemMgr.Retrieve(parameters); //calls the BusinessLogic
IdTextBox.Text = (entity.Id);
PatientNumberTextBox.Text = (entity.PatientNumber);
LastNameTextBox.Text = (entity.LastName);
FirstNameTextBox.Text = (entity.FirstName);
MiddleNameTextBox.Text = (entity.MiddleName);
AddressTextBox.Text = (entity.AddressLine1);
CitiesComboBox.SelectedValue = (short)entity.CityId;
ProvincesComboBox.SelectedValue = (short)entity.ProvinceId;
public void Save(ActionType action, int userId)
itemMgr.Entity = GetPageEntity();
bool doesExist = false;
switch (action)
case ActionType.Insert:
if (itemMgr.Insert((itemMgr.Entity), userId, ref doesExist))
System.Windows.Forms.MessageBox.Show("Successfully added a Patient!", "Patient Insertion");
else if (doesExist)
System.Windows.Forms.MessageBox.Show("Item already exists.", "Patient Insertion");
else
System.Windows.Forms.MessageBox.Show("Not all fields were filled in.", "Patient Insertion");
break;
case ActionType.Update:
if (itemMgr.Update(itemMgr.Entity, userId, ref doesExist))
System.Windows.Forms.MessageBox.Show("Successfully updated a Patient!", "Patient Modification");
itemMgr.Parameters.Id = itemMgr.Entity.Id;
Action = ActionType.Update;
Setup();
else if (doesExist)
System.Windows.Forms.MessageBox.Show("Item already exists.", "Patient Modification");
else
System.Windows.Forms.MessageBox.Show("Not all fields were filled in.", "Patient Modification");
break;
public void Clearer()
IdTextBox.Clear();
PatientNumberTextBox.Clear();
LastNameTextBox.Clear();
FirstNameTextBox.Clear();
MiddleNameTextBox.Clear();
CitiesComboBox.SelectedIndex = 0;
ProvincesComboBox.SelectedIndex = 0;
AddressTextBox.Clear();
public void BindComboBoxes()
CitiesComboBox.ItemsSource = new BindingSource(CommonMgr.GetCitiesDropDown(), null);// the CommonMgr is a static class from another project. It works just fine
CitiesComboBox.DisplayMemberPath = "Value";
CitiesComboBox.SelectedValuePath = "Key";
ProvincesComboBox.ItemsSource = new BindingSource(CommonMgr.GetProvincesDropDown(), null);
ProvincesComboBox.DisplayMemberPath = "Value";
ProvincesComboBox.SelectedValuePath = "Key";
CitiesComboBox.SelectedIndex = 0;
ProvincesComboBox.SelectedIndex = 0;
#endregion
#region Events
private void FunctionButtonsCon_OnExecuteClick(object sender, RoutedEventArgs e)
Save(Action, SessionHelper.MyUser.Id); //SessionHelper.MyUser.Id
private void FunctionButtonsCon_OnUndoClick(object sender, RoutedEventArgs e)
if (Action == ActionType.Insert)
Clearer();
return;
private void FunctionButtonsCon_OnBackClick(object sender, RoutedEventArgs e)
Exiter();
private void FunctionButtonsCon_OnDeleteClick(object sender, RoutedEventArgs e)
var ans = System.Windows.Forms.MessageBox.Show("Are you sure you want to delete this entry?", "Patient Deletion", MessageBoxButtons.YesNo);
if (!Equals(ans, System.Windows.Forms.DialogResult.Yes)) return;
Action = ActionType.Delete;
Save(Action, SessionHelper.MyUser.Id);
Exiter();
#endregionHello Kokombads,
I thought you are using MVVM from your title but it seems your project is just a simple WPF project. In that way, please check the following msdn article to know how to Implement Property Change Notification
https://msdn.microsoft.com/en-us/library/ms743695(v=vs.110).aspx
using System.ComponentModel;
namespace SDKSample
// This class implements INotifyPropertyChanged
// to support one-way and two-way bindings
// (such that the UI element updates when the source
// has been changed dynamically)
public class Person : INotifyPropertyChanged
private string name;
// Declare the event
public event PropertyChangedEventHandler PropertyChanged;
public Person()
public Person(string value)
this.name = value;
public string PersonName
get { return name; }
set
name = value;
// Call OnPropertyChanged whenever the property is updated
OnPropertyChanged("PersonName");
// Create the OnPropertyChanged method to raise the event
protected void OnPropertyChanged(string name)
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
handler(this, new PropertyChangedEventArgs(name));
It is not so complex, you only need to refer to the interface from here:
https://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged(v=vs.110).aspx
And understand that you have to do the following:
For change notification to occur in a binding between a bound client and a data source, your bound type should either:
Implement the INotifyPropertyChanged interface (preferred).
Provide a change event for each property of the bound type
Best regards,
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Maybe you are looking for
-
Problems with running Photoshop CS6 and Bridge with Lightroom 4 also on the same PC
I was running Photoshop and Bridge, then purchased Lightroom 4. Before installingt 4 I had no problems with Bridge, but since installing 4 all of the photo's that were held in bridge are now gone, but they are in Lightroom. With Lightroom, you are ab
-
Quarter Variable from Calendar Year/month
Hi, Does anybody know how to get the quarter value from a selected calendar year/month (0calmonth) entered in the selection screen? Is there any standard variable for that? I don't want current quarter but the quarter that will come from the entered
-
I'm trying to create a file using a Java class on a third-party web-server. However, everytime I try I get a permission denied exception. However, I am able to FTP to this directory. Does anybody know if this is something I can achieve in Java e.g. p
-
New to CC premier pro does not show up in APP list, neither does AE.
cannot download the app
-
Force Logical Block size for HDD pulled from external enclourse
So I pulled a 3tb hitachi drive from an external enclourse, and the usb-to-sata board in the enclourse forced a logical sector size of 4K for the drive. But connecting directly to the drive exposes the logical sector size to 512 bytes. Resulting in m