示例#1
0
        public ViewCollection GetViewsByReport(object u8login, string reportguid)
        {
            init(u8login);
            ViewCollection vc = new ViewCollection();

            string procedurename = "uap_reportview_getviewid";

            SqlCommand cmd = new SqlCommand(procedurename);

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.Add(SqlHelper.GetParameter("@guid", SqlDbType.NVarChar, 100, reportguid));
            cmd.Parameters.Add(SqlHelper.GetParameter("@cAccId", SqlDbType.Char, 3, this._u8login.get_cAcc_Id()));
            cmd.Parameters.Add(SqlHelper.GetParameter("@cYear", SqlDbType.Char, 4, _u8login.cBeginYear));
            cmd.Parameters.Add(SqlHelper.GetParameter("@cUser", SqlDbType.NVarChar, 20, this._u8login.cUserId));

            DataSet ds = SqlHelper.ExecuteDataSet(this._ufMetaConnString, cmd);

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                ViewAuth va = new ViewAuth();
                va.ID = ds.Tables[0].Rows[i]["ViewGuid"].ToString();
                vc.Add(va);
            }

            return(vc);
        }
示例#2
0
        public ViewCollection GetViewsByReport(object u8login, string reportguid, string localeId, OperationEnum op)
        {
            init(u8login);
            string strop = string.Empty;

            if (op == OperationEnum.Query)
            {
                strop = "_01";
            }
            else if (op == OperationEnum.Setting)
            {
                strop = "_02";
            }
            else if (op == OperationEnum.Print)
            {
                strop = "_03";
            }
            else if (op == OperationEnum.Output)
            {
                strop = "_04";
            }
            else if (op == OperationEnum.Publish)
            {
                strop = "_05";
            }

            ViewCollection vc = new ViewCollection();

            string procedurename = "uap_reportview_getviewsbyreport";

            SqlCommand cmd = new SqlCommand(procedurename);

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.Add(SqlHelper.GetParameter("@guid", SqlDbType.NVarChar, 100, reportguid));
            cmd.Parameters.Add(SqlHelper.GetParameter("@cAccId", SqlDbType.Char, 3, this._u8login.get_cAcc_Id()));
            cmd.Parameters.Add(SqlHelper.GetParameter("@cYear", SqlDbType.Char, 4, _u8login.cBeginYear));
            cmd.Parameters.Add(SqlHelper.GetParameter("@cUser", SqlDbType.NVarChar, 20, this._u8login.cUserId));
            cmd.Parameters.Add(SqlHelper.GetParameter("@op", SqlDbType.Char, 3, strop));
            cmd.Parameters.Add(SqlHelper.GetParameter("@LocaleID", SqlDbType.NVarChar, 10, localeId));

            DataSet ds = SqlHelper.ExecuteDataSet(this._ufMetaConnString, cmd);

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                ViewAuth va = new ViewAuth();
                va.ID       = ds.Tables[0].Rows[i]["ViewGuid"].ToString();
                va.Name     = ds.Tables[0].Rows[i]["Name"].ToString();
                va.ViewType = Convert.ToInt32(ds.Tables[0].Rows[i]["ViewType"].ToString());
                //va.AuthCollection = AuthCollectionCheck( va.ID );
                vc.Add(va);
            }

            return(vc);
        }