Esempio n. 1
0
        private void cmdOK_Click(object sender, System.EventArgs e)
        {
            bool bChecked = false;

            UDS.Components.AssignRights ar = new UDS.Components.AssignRights();

            for (int i = 0; i < Act.Items.Count; i++)
            {
                if (Act.Items[i].Selected == true)
                {
                    ar.AddRight(Int32.Parse(SrcID), ClassID, Int32.Parse(DisplayType) + 1, Int32.Parse(Act.Items[i].Value));


                    bChecked = true;
                }
            }

            ar = null;

            if (bChecked == false)
            {
                Response.Write("<script laguage='javascript'>alert('请选择要添加的权限');</script>");
            }
            else
            {
                string url = "RightListView.aspx?ObjID=" + SrcID.ToString() + "&DisplayType=" + DisplayType.ToString();
                Response.Write("<script laguage='javascript'>parent.location='" + url + "';</script>");
            }
        }
Esempio n. 2
0
        private void cmdOK_Click(object sender, System.EventArgs e)
        {
            bool bChecked=false;
            UDS.Components.AssignRights ar = new UDS.Components.AssignRights();

            for(int i=0;i<Act.Items.Count;i++)
            {
                if(Act.Items[i].Selected ==true)
                {

                    ar.AddRight(Int32.Parse(SrcID),ClassID,Int32.Parse(DisplayType)+1,Int32.Parse(Act.Items[i].Value));

                    bChecked = true;
                }
            }

            ar = null;

            if(bChecked==false)
                Response.Write("<script laguage='javascript'>alert('��ѡ��Ҫ��ӵ�Ȩ��');</script>");
            else
            {
                string url="RightListView.aspx?ObjID="  + SrcID.ToString() + "&DisplayType=" + DisplayType.ToString();
                Response.Write("<script laguage='javascript'>parent.location='" + url + "';</script>");

            }
        }
Esempio n. 3
0
        private void FillRightList(string pUserName, long pClassID)
        {
            UDS.Components.AssignRights ar = new UDS.Components.AssignRights();
            SqlDataReader dr;

            ar.GetProcessList(pUserName, pClassID, out dr);

            Act.Items.Clear();

            while (dr.Read())
            {
                Act.Items.Add(new ListItem(dr["proc_name"].ToString(), dr["proc_id"].ToString()));
            }


            ar = null;
        }
Esempio n. 4
0
        private void FillRightList(string pUserName,long pClassID)
        {
            UDS.Components.AssignRights ar = new UDS.Components.AssignRights();
            SqlDataReader dr;
            ar.GetProcessList(pUserName,pClassID,out dr);

            Act.Items.Clear();
            try
            {
                while (dr.Read())
                {
                    Act.Items.Add(new ListItem(dr["proc_name"].ToString(), dr["proc_id"].ToString()));
                }
            }
            finally
            {

                if (dr != null)
                {

                    dr.Close();
                }
            }

            ar = null;
        }