Topic: is it possible to make something like this?

Hi,
i build a business tracking app and it gives tasks to employees.
When i run program i can see tasks for all employees. What i want is a client side (employee side) app.
When employees run the app on their own computer  they will see the tasks related to him.

How can i do it?

What if i make user login system, every employee uses their username and pass to enter app and app will show tasks according to username of that  employee. I put app to main computer and employees launch app from their own computer with local area network.

Is it possinle to make a script that shows tasks according to username of the employee? I had a sample for username system but it only changes permissions

Re: is it possible to make something like this?

Hello,



Yes, you can do it using My Visual Database.


You already made some part of your project?
If yes, please send me it to support@drive-software.com
I'll try to help you.

Dmitry.

Re: is it possible to make something like this?

Why not to post it here? i am interested in such tasks too.

Re: is it possible to make something like this?

kkalgidim

I made for you a simple example:

Post's attachments

Attachment icon Users tasks.zip 37.18 kb, 638 downloads since 2015-02-13 

Dmitry.

Re: is it possible to make something like this?

i apply the example to my project.
users = personel
task = gorev

when i enter with employee account i want to get the tasks related with that employee automatically
but onload it automatically gets all the records even its not related with that employee.

And one thing is about

procedure frmYeniProje_Button6_OnAfterClick (Sender: string);
begin
    Form1.TableGrid1.dbUpdate;
end;


This is for dbupdate  when click to close button. But users with no admin rights getting error when click on it
i am sending you project. Please take a look at this.

username:ferhatfaz
pass:ferhat07

user:admin
pass:admin

Post's attachments

Attachment icon trackingtasks.rar 328.43 kb, 611 downloads since 2015-02-13 

Re: is it possible to make something like this?

This is a very interesting topic!! Thanks for sharing.

Re: is it possible to make something like this?

i chaged the button and form to populate dbupdate. i did same function for save project button to populate. and employees save button already disabled . So problem solved.

Now i am trying to find a way for employee to search filtered results just related with that employee.

if nothing selected and hit the search button its finding all the records. But if i select search parameter (for ex date or any combobox) it works fine, finds related recors.

is there any way to say that if nothing selected find all records related with employee (just for employee account not admin)?

for now i am using this script for employee account

              Form1.TableGrid1.dbFilter:='task.id_employee='+IntToStr(idUser); // show tasks according to user  -- but it shows all records if nothing selected

Re: is it possible to make something like this?

kkalgidim
Sorry for delay. Please attach your latest version of project.
I'll try to help you.


Thanks.

Dmitry.

9 (edited by kkalgidim 2015-02-15 14:56:52)

Re: is it possible to make something like this?

Run app
it asks login pass.
enter  user: ferhatfaz
enter pass:ferhat07


automatically Form1 comes with datas on grid
all data comes but i want only  ferhatfaz user datas (specifically i want ferhatfaz user's AKTIF state datas on program run automatically)


click on search button on form1 (select nothing just click)
all datas comes but i want only ferhatfaz user datas


but if you select state of project or anything else and hit search button it shows only ferhatfaz user datas.


You can see


project (proje)
task (gorev)
employee (personel) tables relation on database section.

Post's attachments

Attachment icon employeetasks.rar 465.33 kb, 589 downloads since 2015-02-15 

Re: is it possible to make something like this?

kkalgidim
It's not your mistake, you are found a bug.
Please, download latest beta version 1,49 here:
https://www.dropbox.com/s/bsk683d3yf6jv … 9.zip?dl=0



also, after the line:

Form1.TableGrid1.dbFilter:='gorev.id_personel='+IntToStr(idUser); // show tasks according to user

Insert the line:

Form1.TableGrid1.dbUpdate;

Then open your project in the latest version and run for bug fix.

Dmitry.

Re: is it possible to make something like this?

now search button search related employee records. That problem solved.
But when i add

Form1.TableGrid1.dbUpdate;

after
Form1.TableGrid1.dbFilter:='gorev.id_personel='+IntToStr(idUser); // show tasks according to user


it gives error: no such column gorev.id_personel

so at start grid not loaded with related records

it mustbe related with my gorev table. You said that something wrong with table and made a calc_fix column to solve problem.
Now it looks like same problem. Can you check it. You can try with same project file above. Just add

Form1.TableGrid1.dbUpdate;

after
Form1.TableGrid1.dbFilter:='gorev.id_personel='+IntToStr(idUser); // show tasks according to user

and login with ferhatfaz user
pass:ferhat07

Re: is it possible to make something like this?

kkalgidim


You need add calc_fix column also in settings of Form1.TableGrid1 for solve problem.


Please, download fixed project here

Post's attachments

Attachment icon employeetasks_fixed.zip 179.59 kb, 666 downloads since 2015-02-16 

Dmitry.

13 (edited by kkalgidim 2015-02-16 10:55:32)

Re: is it possible to make something like this?

Thanx its now working fine.
i triy to load grid with active statusprojects on first load of the program by adding
gorev.id_durum=1 AND  section to following line
         Form1.TableGrid1.dbFilter:=' gorev.id_durum=1 AND gorev.id_personel='+IntToStr(idUser) ;

But with this command i can not search comleted status projects.

Re: is it possible to make something like this?

kkalgidim wrote:

Thanx its now working fine.
i triy to load grid with active statusprojects on first load of the program by adding
gorev.id_durum=1 AND  section to following line
         Form1.TableGrid1.dbFilter:=' gorev.id_durum=1 AND gorev.id_personel='+IntToStr(idUser) ;

But with this command i can not search comleted status projects.


Replace:

Form1.TableGrid1.dbFilter:='gorev.id_personel='+IntToStr(idUser); // show tasks according to user              
Form1.TableGrid1.dbUpdate;

             
to

Form1.TableGrid1.dbFilter:='gorev.id_durum=1 AND gorev.id_personel='+IntToStr(idUser); // show tasks according to user
Form1.TableGrid1.dbUpdate;
Form1.TableGrid1.dbFilter:='gorev.id_personel='+IntToStr(idUser); // show tasks according to user
Dmitry.

Re: is it possible to make something like this?

Oh, i got it.
Thanks for your help.