Ejemplo n.º 1
0
 public CorePODInfo(CorePODInfo objEntr)
 {
     _USER_ID    = objEntr.USER_ID;
     _TB         = objEntr.TB;
     _USER_ID1   = objEntr.USER_ID1;
     _USER_NAME  = objEntr.USER_NAME;
     _DB_DEFAULT = objEntr.DB_DEFAULT;
     _LANGUAGE   = objEntr.LANGUAGE;
     _ROLE_ID    = objEntr.ROLE_ID;
     _PASS       = objEntr.PASS;
 }
Ejemplo n.º 2
0
        public static string SetDataAccessGroup(string DAField, DataTable dt, string _user)
        {
            if (!dt.Columns.Contains(DAField))
            {
                return("DAField is not exist int DataTable");
            }
            string sErr = "";

            BUS.CoreDAControl  daCtr       = new BUS.CoreDAControl();
            BUS.CorePODControl podCtr      = new BUS.CorePODControl();
            DTO.CorePODInfo    usrinf      = podCtr.Get(_user, ref sErr);
            DataTable          dtPermision = daCtr.GetPermissionByRole(usrinf.ROLE_ID, ref sErr);

            if (dtPermision.Rows.Count == 0)
            {
                dt.Rows.Clear();
            }
            for (int i = dt.Rows.Count - 1; i >= 0; i--)
            {
                string flag = "";
                bool   ie   = true;
                foreach (DataRow row in dtPermision.Rows)
                {
                    if (dt.Rows[i][DAField].ToString().Trim() != "")
                    {
                        if (dt.Rows[i][DAField].ToString().Trim() == row["DAG_ID"].ToString())
                        {
                            flag = row["EI"].ToString();
                        }
                        else if (row["EI"].ToString() == "I")
                        {
                            ie = false;
                        }
                    }
                }
                if ((flag == "" && ie) || flag == "I")
                {
                }
                else
                {
                    dt.Rows.Remove(dt.Rows[i]);
                }
            }
            return(sErr);
        }