Пример #1
0
 public searchinrawmaterialform(SH_EMPLOYEES anyemp, SH_USER_ACCOUNTS anyAccount, SH_USER_PERMISIONS anyperm)
 {
     InitializeComponent();
     mEmployee   = anyemp;
     mAccount    = anyAccount;
     mPermission = anyperm;
 }
Пример #2
0
 public printfinishedcanstotalbalanceform(SH_EMPLOYEES anyemp, SH_USER_ACCOUNTS anyaacount, SH_USER_PERMISIONS anyperm)
 {
     InitializeComponent();
     mEmployee   = anyemp;
     mAccount    = anyaacount;
     mPermission = anyperm;
 }
        public SH_USER_PERMISIONS getUserPermission(SH_USER_ACCOUNTS acc)
        {
            SH_USER_PERMISIONS perm = new SH_USER_PERMISIONS();

            try
            {
                DatabaseConnection myconnection = new DatabaseConnection();
                myconnection.openConnection();

                SqlCommand cmd = new SqlCommand("select * from SH_USER_PERMISIONS", DatabaseConnection.mConnection);
                //  cmd.cmdandType = cmdandType.StoreaderProcedure;

                // cmd.Parameters.AddWithValue("@empid", acc.SH_EMP_ID);
                SqlDataReader reader = cmd.ExecuteReader();
                while (reader.Read())
                {
                    perm.SH_ID = long.Parse(reader["SH_ID"].ToString());

                    perm.SH_ACCOUNT_ID   = long.Parse(reader["SH_ACCOUNT_ID"].ToString());
                    perm.SH_ACCOUNT_NAME = reader["SH_ACCOUNT_NAME"].ToString();
                }
                myconnection.closeConnection();
                return(perm);
            }
            catch (Exception ex)
            {
                MessageBox.Show("ERROR WHIE GETTING USER PERMISSION " + ex.ToString());
            }
            return(null);
        }
 public getAllEmployeesFrm(SH_EMPLOYEES anyEmployee, SH_USER_ACCOUNTS anyAccount, SH_USER_PERMISIONS anyPermission)
 {
     InitializeComponent();
     memployee   = anyEmployee;
     maccount    = anyAccount;
     mpermission = anyPermission;
 }
Пример #5
0
 public changePassword(SH_USER_ACCOUNTS acc, SH_EMPLOYEES mEmp, SH_USER_PERMISIONS anyperm)
 {
     InitializeComponent();
     accnt   = acc;
     emp     = mEmp;
     SH_Perm = anyperm;
 }
 public addnewcutprintedmaterial(SH_EMPLOYEES anyemp, SH_USER_ACCOUNTS anyAccount, SH_USER_PERMISIONS anyPermission)
 {
     InitializeComponent();
     mEmployee   = anyemp;
     mAccount    = anyAccount;
     mPermission = anyPermission;
 }
Пример #7
0
 public addnewclientproductfilm(SH_EMPLOYEES anyemp, SH_USER_ACCOUNTS anyaccount, SH_USER_PERMISIONS anyperm)
 {
     InitializeComponent();
     mEmployee   = anyemp;
     mAccount    = anyaccount;
     mPermission = anyperm;
 }
Пример #8
0
 public maintenanceworkorders(SH_EMPLOYEES anyemp, SH_USER_ACCOUNTS anyaccount, SH_USER_PERMISIONS anypermission)
 {
     InitializeComponent();
     mEmployee   = anyemp;
     mAccount    = anyaccount;
     mPermission = anypermission;
 }
 public allfinishedproductsdata(SH_EMPLOYEES anyemp, SH_USER_ACCOUNTS anyaccount, SH_USER_PERMISIONS anyperm)
 {
     InitializeComponent();
     mEmployee   = anyemp;
     mAccount    = anyaccount;
     mPermission = anyperm;
 }
 public cartondividersportalform(SH_EMPLOYEES anyemp, SH_USER_ACCOUNTS anyAccount, SH_USER_PERMISIONS anyPerm)
 {
     InitializeComponent();
     mEmployee   = anyemp;
     mAccount    = anyAccount;
     mPermission = anyPerm;
 }
Пример #11
0
        public SH_USER_PERMISIONS getUserPermission(SH_USER_ACCOUNTS acc)
        {
            SH_USER_PERMISIONS perm = new SH_USER_PERMISIONS();

            try
            {
                DatabaseConnection conn = new DatabaseConnection();
                conn.openConnection();
                SqlCommand com2 = new SqlCommand("getpermissionOneEmp", DatabaseConnection.mConnection);
                com2.CommandType = CommandType.StoredProcedure;
                //problem
                com2.Parameters.AddWithValue("@empid", acc.SH_ID);
                SqlDataReader red = com2.ExecuteReader();
                while (red.Read())
                {
                    perm.SH_ID = long.Parse(red["SH_ID"].ToString());

                    perm.SH_ACCOUNT_ID   = long.Parse(red["SH_ACCOUNT_ID"].ToString());
                    perm.SH_ACCOUNT_NAME = red["SH_ACCOUNT_NAME"].ToString();
                }
                conn.closeConnection();
                return(perm);
            }
            catch (Exception ex)
            {
                MessageBox.Show("ERROR WHIE GETTING USER PERMISSION " + ex.ToString());
            }
            return(null);
        }
Пример #12
0
 public ViewUserPermisions(SH_EMPLOYEES Memp, SH_USER_PERMISIONS anyper, SH_USER_ACCOUNTS accnt)
 {
     InitializeComponent();
     acc  = accnt;
     emp  = Memp;
     perm = anyper;
 }
Пример #13
0
 public Mainform(SH_EMPLOYEES anyEmployee, SH_USER_ACCOUNTS anyaccount, SH_USER_PERMISIONS anypermission)
 {
     InitializeComponent();
     mEmployee   = anyEmployee;
     mAccount    = anyaccount;
     mPermission = anypermission;
 }
Пример #14
0
 public Display_allUsers(SH_EMPLOYEES anyemp, SH_USER_ACCOUNTS anyacount, SH_USER_PERMISIONS anyPerm)
 {
     InitializeComponent();
     SH_emp  = anyemp;
     SH_acc  = anyacount;
     SH_perm = anyPerm;
 }
 public addnewplasticcoverform(SH_EMPLOYEES anyemp, SH_USER_ACCOUNTS anyaccount, SH_USER_PERMISIONS anyPerm)
 {
     InitializeComponent();
     mEmployee   = anyemp;
     mAccount    = anyaccount;
     mPermission = anyPerm;
 }
 public AddNewDepartment(SH_EMPLOYEES anyemp, SH_USER_ACCOUNTS anyaccount, SH_USER_PERMISIONS anypermission)
 {
     InitializeComponent();
     mEmployee   = anyemp;
     mAccount    = anyaccount;
     mPermission = anypermission;
 }
 public allproductionrequirementsforms(SH_EMPLOYEES anyemp, SH_USER_ACCOUNTS anyAccount, SH_USER_PERMISIONS anyPerm)
 {
     InitializeComponent();
     mEmployee   = anyemp;
     mAccount    = anyAccount;
     mPermission = anyPerm;
 }
Пример #18
0
 public makenewuser(SH_EMPLOYEES selectedemployee, SH_EMPLOYEES anyone, SH_USER_ACCOUNTS anyaccount, SH_USER_PERMISIONS anyperm)
 {
     InitializeComponent();
     mEmployee   = anyone;
     maccount    = anyaccount;
     mpermission = anyperm;
     myEmployee  = selectedemployee;
 }
 public add_new_client_company_btn(SH_CLIENT_COMPANY anycompany, SH_EMPLOYEES anyemp, SH_USER_ACCOUNTS anyaccount, SH_USER_PERMISIONS anyperm)
 {
     InitializeComponent();
     mclient     = anycompany;
     mEmployee   = anyemp;
     mAccount    = anyaccount;
     mPermission = anyperm;
 }
 public add_new_supply_company_form(SH_EMPLOYEES anyemp, SH_USER_ACCOUNTS anyAccount, SH_USER_PERMISIONS anyperm)
 {
     InitializeComponent();
     mPermission = anyperm;
     mAccount    = anyAccount;
     mPermission = anyperm;
     mEmployee   = anyemp;
 }