//public void DeleteRolePrivilegeBy(int menuId)
    //{

    //    Smartworks.ColumnField[] dRolePrivilege = new Smartworks.ColumnField[1];
    //    dRolePrivilege[0] = new Smartworks.ColumnField("@MenuId", menuId);

    //    dataAccess.BeginTransaction();
    //    dataAccess.ExecuteStoredProcedure("dbo.DeleteRolePrivilegeByMenu", dRolePrivilege);
    //    dataAccess.TransCommit();

    //}

    public DataSet GetMenu()
    {
        DataSet ds;
        string  queryString = " Select *  From Menu where IsParent=1";

        dataAccess.ConnectionOpen();
        ds = dataAccess.getDataSet(queryString);
        dataAccess.ConnectionClose();

        return(ds);
    }
Esempio n. 2
0
    public DataTable GetMenuById(int menuId)
    {
        DataSet ds;
        string  queryString = "SELECT    * FROM         Menu WHERE MenuId=" + menuId;

        //iscrm=1 and
        dataAccess.ConnectionOpen();
        ds = dataAccess.getDataSet(queryString);
        dataAccess.ConnectionClose();

        return(ds.Tables[0]);
    }
Esempio n. 3
0
 public void UpdatePosCustomer(int CustomerId)
 {
     //dataAccess.BeginTransaction();
     //dataAccess.TransCommit();
     dataAccess.ConnectionOpen();
     dataAccess.ExecuteNonQuery("UPDATE  dbo.Customer SET Ispos = 0 WHERE CustomerId != " + CustomerId);
 }
Esempio n. 4
0
    public DataTable GetUserName(string userName, string password)
    {
        DataTable dt = new DataTable();

        Smartworks.ColumnField[] GetUserManager = new Smartworks.ColumnField[2];
        GetUserManager[0] = new Smartworks.ColumnField("@UserName", userName);
        GetUserManager[1] = new Smartworks.ColumnField("@Password", Encrypt(password));
        try
        {
            dataAccess.ConnectionOpen();
            dt = dataAccess.getDataTableByStoredProcedure("dbo.GetUserName", GetUserManager);
            dataAccess.ConnectionClose();
        }
        catch (Exception ex)
        {
        }
        finally
        {
            dataAccess.ConnectionClose();
        }
        return(dt);
    }
Esempio n. 5
0
    public DataTable GetRolesAgainstRolePrivilege()
    {
        DataTable dt;
        string    queryString = " SELECT dbo.Roles.RoleName, dbo.Roles.RoleId" +
                                " FROM dbo.RolePrivilege INNER JOIN" +
                                " dbo.Roles ON dbo.RolePrivilege.RoleId = dbo.Roles.RoleId" +
                                " GROUP BY dbo.Roles.RoleName, dbo.Roles.RoleId ";

        dataAccess.ConnectionOpen();
        dt = dataAccess.getDataTable(queryString);
        dataAccess.ConnectionClose();

        return(dt);



        return(dt);
    }