View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - [SOLVED] Question about SaveObject() - ProjeQtOr

Prochaines sessions de formation

Les prochaines formations et démonstrations sont ouvertes, inscrivez-vous rapidement !

 

Démonstration de ProjeQtOr

(gratuit, sur inscription)

Mardi 23 avril (10h30-12h)

Jeudi 16 mai (16h-17h30)

Jeudi 13 juin (10h30-12h)

 
 

Planifiez avec ProjeQtOr

3 et 4 avril (9h - 12h30)

 
 

Administrez avec ProjeQtOr

10 et 11 avril (9h - 12h30)

 

 

 
 

[SOLVED] Question about SaveObject()

More
29 Jan 2016 14:44 - 29 Jan 2016 14:44 #1 by keloniton
Hello.
Mr babynus, first of all, I would like to thank you for your ongoing support. I appreciate if you help me with the following question:
Question1. I founded that SaveObject() is loaded when we click on save in pages such as Project, Document etc. I saw the source code but i could not recognize how i can get access to a scefic item (such as evaluated StartDate, Evaluated Enddate) which user has entered. for example the user enters date based on Jalali calander and when he clicks on save button i automatically change it to gerigorean calander format (However the user does not see the changed format). How can i get access to a specific item amout before being saved in SQL database?
Regards
Last edit: 29 Jan 2016 14:44 by keloniton.

Please Connexion or Create an account to join the conversation.

More
29 Jan 2016 15:08 #2 by babynus
Replied by babynus on topic Question about SaveObject()
These dates are in Included object.
For instance in Project, you should refer to it as $project->PRojectPlanningElement->validedStartDate

The data entered by user is retreived in SqlElement::fillFromRequest() (call as $project->fillFromRequest)

Babynus
Administrator of ProjeQtOr web site
The following user(s) said Thank You: keloniton

Please Connexion or Create an account to join the conversation.

More
29 Jan 2016 20:42 - 31 Jan 2016 10:05 #3 by keloniton
As you mentioned, an object is made of the classes (presented in ../model) when we click save button. Then, we should refer to object and variable to access what a variable contains after clicking save. So in tool/saveObject.php i add this code, but an error occures. I appreciate to know your idea:
// first i added some codes for converting Jalali calendar to gregorian calander
if ( $classname == "ProjectPlanningElementMain") {
$newObj->validatedStartDate=date('Ymd', strtotime(jalali_to_gregorian(jdate('Y',$newObj->validatedStartDate),jdate('m',$newObj->validatedStartDate),jdate('d',$newObj->validatedStartDate),'-'))); //jalali_to_gregorian is a function which converts the date for example 1394-11-9 of jalali calander will be as 2016-1-29 and jdate is a related function
}
Thank you very much
Last edit: 31 Jan 2016 10:05 by keloniton.

Please Connexion or Create an account to join the conversation.

More
31 Jan 2016 22:12 #4 by babynus
Replied by babynus on topic Question about SaveObject()
What is the error ?

Babynus
Administrator of ProjeQtOr web site
The following user(s) said Thank You: keloniton

Please Connexion or Create an account to join the conversation.

More
31 Jan 2016 22:17 #5 by keloniton
Here it is
Attachments:

Please Connexion or Create an account to join the conversation.

More
31 Jan 2016 23:12 #6 by babynus
Replied by babynus on topic Question about SaveObject()
please post error written in the log file.

Babynus
Administrator of ProjeQtOr web site
The following user(s) said Thank You: keloniton

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.040 seconds

Paramétrages de cookies

×

Cookies fonctionnels

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Veuillez vous connecter pour voir vos activités!

Autres cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.